2014-01-15 03:35:09 +08:00
|
|
|
// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -o - %s | FileCheck %s
|
2009-11-26 10:52:12 +08:00
|
|
|
|
|
|
|
const int x = 10;
|
|
|
|
const int y = 20;
|
2012-10-19 14:37:48 +08:00
|
|
|
const volatile int z = 30;
|
2009-11-26 10:52:12 +08:00
|
|
|
// CHECK-NOT: @x
|
2018-02-24 03:30:48 +08:00
|
|
|
// CHECK: @z = {{(dso_local )?}}constant i32 30
|
2010-01-24 11:04:27 +08:00
|
|
|
// CHECK: @_ZL1y = internal constant i32 20
|
2009-11-26 10:52:12 +08:00
|
|
|
const int& b() { return y; }
|
|
|
|
|
2009-11-26 11:04:01 +08:00
|
|
|
const char z1[] = "asdf";
|
|
|
|
const char z2[] = "zxcv";
|
2012-10-19 14:37:48 +08:00
|
|
|
const volatile char z3[] = "zxcv";
|
2009-11-26 11:04:01 +08:00
|
|
|
// CHECK-NOT: @z1
|
2018-02-24 03:30:48 +08:00
|
|
|
// CHECK: @z3 = {{(dso_local )?}}constant
|
2010-01-24 11:04:27 +08:00
|
|
|
// CHECK: @_ZL2z2 = internal constant
|
2009-11-26 11:04:01 +08:00
|
|
|
const char* b2() { return z2; }
|