| 1 |
// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -o - %s | FileCheck %s |
| 2 |
|
| 3 |
const int x = 10; |
| 4 |
const int y = 20; |
| 5 |
const volatile int z = 30; |
| 6 |
// CHECK-NOT: @x |
| 7 |
// CHECK: @z = {{(dso_local )?}}constant i32 30 |
| 8 |
// CHECK: @_ZL1y = internal constant i32 20 |
| 9 |
const int& b() { return y; } |
| 10 |
|
| 11 |
const char z1[] = "asdf"; |
| 12 |
const char z2[] = "zxcv"; |
| 13 |
const volatile char z3[] = "zxcv"; |
| 14 |
// CHECK-NOT: @z1 |
| 15 |
// CHECK: @z3 = {{(dso_local )?}}constant |
| 16 |
// CHECK: @_ZL2z2 = internal constant |
| 17 |
const char* b2() { return z2; } |