David Chisnall | 5f3c163 | 2012-02-18 16:12:34 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -triple=i386-pc-solaris2.11 -w -emit-llvm %s -o - | FileCheck %s |
| 2 | |
| 3 | #pragma redefine_extname fake real |
| 4 | #pragma redefine_extname name alias |
| 5 | |
| 6 | extern int fake(void); |
| 7 | |
| 8 | int name; |
| 9 | |
| 10 | // __PRAGMA_REDEFINE_EXTNAME should be defined. This will fail if it isn't... |
| 11 | int fish() { return fake() + __PRAGMA_REDEFINE_EXTNAME + name; } |
| 12 | // Check that the call to fake() is emitted as a call to real() |
| 13 | // CHECK: call i32 @real() |
| 14 | // Check that this also works with variables names |
Pirama Arumuga Nainar | 3ea9e33 | 2015-04-08 08:57:32 -0700 | [diff] [blame] | 15 | // CHECK: load i32, i32* @alias |