2010-01-08 08:50:11 +08:00
|
|
|
// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
|
|
|
|
// 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
|
|
|
|
|
|
|
// CHECK: define internal void @__cxx_global_var_init
|
|
|
|
// CHECK: load i8** @foo
|
|
|
|
// CHECK: ret void
|
|
|
|
|
2010-03-20 12:15:41 +08:00
|
|
|
// CHECK: define internal void @_GLOBAL__I_a
|
2010-01-08 08:50:11 +08:00
|
|
|
// CHECK: call void @__cxx_global_var_init()
|
|
|
|
// CHECK: ret void
|