1 // RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -o - %s | FileCheck %s
3 struct Global
{ Global(); };
4 template<typename T
> struct X
{ X() {} };
8 struct Anon
{ Anon() {} };
10 // CHECK: @_ZN12_GLOBAL__N_15anon0E = internal global
14 // CHECK: @anon1 = internal global
17 // CHECK: @anon2 = internal global
20 char const * const xyzzy
= "Hello, world!";
21 extern char const * const xyzzy
;
23 char const * const *test1()
25 // CHECK: @_ZL5xyzzy = internal constant
29 static char const * const static_xyzzy
= "Hello, world!";
30 extern char const * const static_xyzzy
;
32 char const * const *test2()
34 // CHECK: @_ZL12static_xyzzy = internal constant
38 static char const * static_nonconst_xyzzy
= "Hello, world!";
39 extern char const * static_nonconst_xyzzy
;
43 // CHECK: @_ZL21static_nonconst_xyzzy = internal global
44 return &static_nonconst_xyzzy
;
48 char const * extern_nonconst_xyzzy
= "Hello, world!";
49 extern char const * extern_nonconst_xyzzy
;
53 // CHECK: @extern_nonconst_xyzzy = {{(dso_local )?}}global
54 return &extern_nonconst_xyzzy
;
58 template <typename T
> class klass
{
61 namespace { struct S
; }
62 void foo () { klass
<S
> x
; }
63 // CHECK: @_ZTV5klassIN12_GLOBAL__N_11SEE = internal unnamed_addr constant