2014-01-15 03:35:09 +08:00
|
|
|
// RUN: %clang_cc1 %s -triple %itanium_abi_triple -emit-llvm -o - | FileCheck %s
|
2010-01-08 08:50:11 +08:00
|
|
|
// PR5967
|
|
|
|
|
|
|
|
extern void* foo;
|
|
|
|
static void* const a = foo;
|
|
|
|
void* bar() { return a; }
|
|
|
|
|
2010-01-24 11:04:27 +08:00
|
|
|
// CHECK: @_ZL1a = internal global i8* null
|
2010-01-08 08:50:11 +08:00
|
|
|
|
2015-06-30 01:29:50 +08:00
|
|
|
// CHECK-LABEL: define internal {{.*}}void @__cxx_global_var_init
|
2015-02-28 05:19:58 +08:00
|
|
|
// CHECK: load i8*, i8** @foo
|
2010-01-08 08:50:11 +08:00
|
|
|
// CHECK: ret void
|
|
|
|
|
2015-06-30 01:29:50 +08:00
|
|
|
// CHECK-LABEL: define internal {{.*}}void @_GLOBAL__sub_I_deferred_global_init.cpp
|
|
|
|
// CHECK: call {{.*}}void @__cxx_global_var_init()
|
2010-01-08 08:50:11 +08:00
|
|
|
// CHECK: ret void
|