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