- This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). llvm-svn: 91446
23 lines
404 B
C++
23 lines
404 B
C++
// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
|
|
|
|
namespace {
|
|
// CHECK: @_ZN12_GLOBAL__N_11aE = internal global i32 0
|
|
int a = 0;
|
|
|
|
// CHECK: define internal i32 @_ZN12_GLOBAL__N_13fooEv()
|
|
int foo() {
|
|
return 32;
|
|
}
|
|
|
|
// CHECK: define internal i32 @_ZN12_GLOBAL__N_11A3fooEv()
|
|
namespace A {
|
|
int foo() {
|
|
return 45;
|
|
}
|
|
}
|
|
}
|
|
|
|
int concrete() {
|
|
return a + foo() + A::foo();
|
|
}
|