aboutsummaryrefslogtreecommitdiffstats
path: root/test/LTO/X86/runtime-library.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/LTO/X86/runtime-library.ll')
-rw-r--r--test/LTO/X86/runtime-library.ll27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/LTO/X86/runtime-library.ll b/test/LTO/X86/runtime-library.ll
new file mode 100644
index 0000000..76fc6f0
--- /dev/null
+++ b/test/LTO/X86/runtime-library.ll
@@ -0,0 +1,27 @@
+; runtime library implementations should be added to llvm.compiler.used
+; RUN: llvm-as <%s >%t1
+; RUN: llvm-lto -o %t2 %t1
+; RUN: llvm-nm -no-sort %t2 | FileCheck %s -check-prefix=KEEP -check-prefix=LOSE
+
+target triple = "x86_64-apple-darwin9"
+
+; KEEP-LABEL: _puts
+define void @puts() {
+ ret void
+}
+
+; KEEP-LABEL: ___divti3
+define void @__divti3() {
+ ret void
+}
+
+; KEEP-LABEL: _memset
+define void @memset() {
+ ret void
+}
+
+; LOSE-NOT: _myprintf
+define void @myprintf() {
+ ret void
+}
+