aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/extern-c.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGenCXX/extern-c.cpp')
-rw-r--r--test/CodeGenCXX/extern-c.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/test/CodeGenCXX/extern-c.cpp b/test/CodeGenCXX/extern-c.cpp
index 5899b9348c5a..fefb216ea1c0 100644
--- a/test/CodeGenCXX/extern-c.cpp
+++ b/test/CodeGenCXX/extern-c.cpp
@@ -1,18 +1,21 @@
-// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm %s -o - | FileCheck %s
namespace foo {
-// CHECK-NOT: @a = global i32
+// CHECK-NOT: @a = global
extern "C" int a;
-// CHECK-NOT: @_ZN3foo1bE = global i32
+// CHECK-NOT: @_ZN3foo1bE = global
extern int b;
-// CHECK: @_ZN3foo1cE = global i32
+// CHECK: @_ZN3foo1cE = global
int c = 5;
// CHECK-NOT: @_ZN3foo1dE
extern "C" struct d;
+// CHECK-NOT: should_not_appear
+extern "C++" int should_not_appear;
+
}
namespace test1 {
@@ -63,3 +66,10 @@ extern "C" {
// CHECK-NOT: @unused
// CHECK-NOT: @duplicate_internal
}
+
+namespace PR19411 {
+ struct A { void f(); };
+ extern "C" void A::f() { void g(); g(); }
+ // CHECK-LABEL: @_ZN7PR194111A1fEv(
+ // CHECK: call void @g()
+}