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.
llvm-svn: 143049
diff --git a/clang/test/CodeGen/pr9614.c b/clang/test/CodeGen/pr9614.c
new file mode 100644
index 0000000..9cc7fa3
--- /dev/null
+++ b/clang/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