Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s |
Eli Friedman | bd94ab9 | 2009-11-26 02:52:12 +0000 | [diff] [blame] | 2 | |
| 3 | const int x = 10; |
| 4 | const int y = 20; |
| 5 | // CHECK-NOT: @x |
Sean Hunt | 3145525 | 2010-01-24 03:04:27 +0000 | [diff] [blame] | 6 | // CHECK: @_ZL1y = internal constant i32 20 |
Eli Friedman | bd94ab9 | 2009-11-26 02:52:12 +0000 | [diff] [blame] | 7 | const int& b() { return y; } |
| 8 | |
Eli Friedman | e9d6554 | 2009-11-26 03:04:01 +0000 | [diff] [blame] | 9 | const char z1[] = "asdf"; |
| 10 | const char z2[] = "zxcv"; |
| 11 | // CHECK-NOT: @z1 |
Sean Hunt | 3145525 | 2010-01-24 03:04:27 +0000 | [diff] [blame] | 12 | // CHECK: @_ZL2z2 = internal constant |
Eli Friedman | e9d6554 | 2009-11-26 03:04:01 +0000 | [diff] [blame] | 13 | const char* b2() { return z2; } |