1 // RUN: %clang_cc1 -fcxx-exceptions -fexceptions -triple x86_64-apple-darwin10 -emit-llvm %s -o - > %t
2 // RUN: FileCheck %s -check-prefix=CHECK-1 < %t
3 // RUN: FileCheck %s -check-prefix=CHECK-2 < %t
8 // CHECK-1: @_ZN12_GLOBAL__N_11bE = internal global i32 0
9 // CHECK-1: @_ZN12_GLOBAL__N_11cE = internal global i32 0
10 // CHECK-1: @_ZN12_GLOBAL__N_12c2E = internal global i32 0
11 // CHECK-1: @_ZN12_GLOBAL__N_11D1dE = internal global i32 0
12 // CHECK-1: @_ZN12_GLOBAL__N_11aE = internal global i32 0
19 // Note, we can't use an 'L' mangling for c or c2 (like GCC does) based on
20 // the 'static' specifier, because the variable can be redeclared without it.
22 int g() { return c2
; }
31 // Check for generation of a VTT with internal linkage
32 // CHECK-1: @_ZTSN12_GLOBAL__N_11X1EE = internal constant
35 struct E
: public virtual EBase
{ virtual ~E() {} };
38 // CHECK-1-LABEL: define internal noundef i32 @_ZN12_GLOBAL__N_13fooEv()
43 // CHECK-1-LABEL: define internal noundef i32 @_ZN12_GLOBAL__N_11A3fooEv()
52 return a
+ foo() + A::foo();
55 void test_XE() { throw X::E(); }
57 // Miscompile on llvmc plugins.
60 template <class T
> struct B
{
68 // CHECK-2-LABEL: define{{.*}} void @_ZN5test24testEv()
69 // CHECK-2: call void @_ZN5test21A1BINS_12_GLOBAL__N_11CEE3fooEv()
74 // CHECK-2-LABEL: define internal void @_ZN5test21A1BINS_12_GLOBAL__N_11CEE3fooEv()