extern "C" {
static void test2_f() {
}
- // CHECK-LABEL: define internal {{.*}}void @_Z7test2_fv
+ // CHECK-LABEL: define internal {{.*}}void @_ZL7test2_fv
static void test2_f(int x) {
}
- // CHECK-LABEL: define internal {{.*}}void @_Z7test2_fi
+ // CHECK-LABEL: define internal {{.*}}void @_ZL7test2_fi
void test2_use() {
test2_f();
test2_f(42);
// CHECK-NOT: should_not_appear
extern "C++" int should_not_appear;
+// CHECK: @_ZN3foo10extern_cxxE = global
+extern "C++" int extern_cxx = 0;
+
}
+// CHECK-NOT: @global_a = global
+extern "C" int global_a;
+
+// CHECK: @global_b = global
+extern "C" int global_b = 0;
+
+// CHECK-NOT: should_not_appear
+extern "C++" int should_not_appear;
+
+// CHECK: @extern_cxx = global
+extern "C++" int extern_cxx = 0;
+
namespace test1 {
namespace {
struct X {};
// CHECK-NOT: @unused
// CHECK-NOT: @duplicate_internal
- // CHECK: @internal_var = internal alias i32, i32* @_Z12internal_var
+ // CHECK: @internal_var = internal alias i32, i32* @_ZL12internal_var
// CHECK-NOT: @unused
// CHECK-NOT: @duplicate_internal
- // CHECK: @internal_fn = internal alias i32 (), i32 ()* @_Z11internal_fnv
+ // CHECK: @internal_fn = internal alias i32 (), i32 ()* @_ZL11internal_fnv
// CHECK-NOT: @unused
// CHECK-NOT: @duplicate_internal
}