1 // RUN: %clang_cc1 -triple x86_64-apple-darwin10.0.0 -emit-llvm -o - %s -std=c++11 -debug-info-kind=limited | FileCheck %s
4 volatile char *ptr
= 0;
13 static int i
= test();
14 __attribute__((nodebug
)) static int j
= test();
15 static int k
= test();
19 // CHECK-LABEL: define internal void @__cxx_global_var_init()
20 // CHECK-NOT: __cxx_global_var_init
21 // CHECK: %[[C0:.+]] = call noundef i32 @_Z4testv(), !dbg ![[LINE:.*]]
22 // CHECK-NOT: __cxx_global_var_init
23 // CHECK: store i32 %[[C0]], ptr @_ZL1i, align 4, !dbg
25 // CHECK-LABEL: define internal void @__cxx_global_var_init.1()
27 // CHECK: %[[C1:.+]] = call noundef i32 @_Z4testv()
29 // CHECK: store i32 %[[C1]], ptr @_ZL1j, align 4
31 // CHECK-LABEL: define internal void @__cxx_global_var_init.2()
32 // CHECK-NOT: __cxx_global_var_init
33 // CHECK: %[[C2:.+]] = call noundef i32 @_Z4testv(), !dbg ![[LINE2:.*]]
34 // CHECK-NOT: __cxx_global_var_init
35 // CHECK: store i32 %[[C2]], ptr @_ZL1k, align 4, !dbg
37 // CHECK: ![[LINE]] = !DILocation(line: 13,
38 // CHECK: ![[LINE2]] = !DILocation(line: 15,