aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/pr9614.c
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2011-10-26 20:41:06 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2011-10-26 20:41:06 +0000
commita411d2f1ed4598a7a96a7befe07a9d9ee1a6efde (patch)
treeb829ea5b2d3a94918477cca8a1362e1760e8d97b /test/CodeGen/pr9614.c
parent29e627ad9679bd3aa274cbe464127fdaba6241ca (diff)
Fix pr9614 by not emitting an available_externally function when it calls
itself via an asm label. available_externally functions are supposed to correspond to an external function, and that is not the case in the examples in pr9614. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143049 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/pr9614.c')
-rw-r--r--test/CodeGen/pr9614.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/CodeGen/pr9614.c b/test/CodeGen/pr9614.c
new file mode 100644
index 0000000000..9cc7fa3bed
--- /dev/null
+++ b/test/CodeGen/pr9614.c
@@ -0,0 +1,15 @@
+// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
+
+extern int foo_alias (void) __asm ("foo");
+inline int foo (void) {
+ return foo_alias ();
+}
+int f(void) {
+ return foo();
+}
+
+// CHECK-NOT: define
+// CHECK: define i32 @f()
+// CHECK: %call = call i32 @foo()
+// CHECK: ret i32 %call
+// CHECK-NOT: define