[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / CodeGenCXX / global-llvm-constant.cpp
blob877683eead0724fb3415bb22749c672f3ca04e66
1 // RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -o - %s | FileCheck %s
3 struct A {
4 A() { x = 10; }
5 int x;
6 };
8 const A x;
10 // CHECK: @_ZL1x = internal global
12 struct X {
13 int (*fp)(int, int);
16 int add(int x, int y) { return x + y; }
18 // CHECK: @x2 = {{(dso_local )?}}constant
19 extern const X x2;
20 const X x2 = { &add };
22 struct X1 {
23 mutable int i;
26 struct X2 {
27 X1 array[3];
30 // CHECK: @x2b = {{(dso_local )?}}global
31 extern const X2 x2b;
32 const X2 x2b = { { { 1 }, { 2 }, { 3 } } };