aboutsummaryrefslogtreecommitdiffstats
path: root/test/Object
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2011-10-25 22:30:58 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2011-10-25 22:30:58 +0000
commit93fe4ae091112769601a203bfcc288f52f778fef (patch)
tree6f3c94e9c819642b5c24f74739d9c71d65c08579 /test/Object
parentaaf98ead114bcd51cd2479badfe28b8d0e4895c2 (diff)
downloadexternal_llvm-93fe4ae091112769601a203bfcc288f52f778fef.zip
external_llvm-93fe4ae091112769601a203bfcc288f52f778fef.tar.gz
external_llvm-93fe4ae091112769601a203bfcc288f52f778fef.tar.bz2
Object: change test to create archive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142982 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Object')
-rw-r--r--test/Object/TestObjectFiles/archive-test.a-bitcodebin790 -> 0 bytes
-rw-r--r--test/Object/TestObjectFiles/trivial.ll12
-rw-r--r--test/Object/nm-archive.test5
3 files changed, 15 insertions, 2 deletions
diff --git a/test/Object/TestObjectFiles/archive-test.a-bitcode b/test/Object/TestObjectFiles/archive-test.a-bitcode
deleted file mode 100644
index 3aeb34f..0000000
--- a/test/Object/TestObjectFiles/archive-test.a-bitcode
+++ /dev/null
Binary files differ
diff --git a/test/Object/TestObjectFiles/trivial.ll b/test/Object/TestObjectFiles/trivial.ll
new file mode 100644
index 0000000..25ece76
--- /dev/null
+++ b/test/Object/TestObjectFiles/trivial.ll
@@ -0,0 +1,12 @@
+@.str = private unnamed_addr constant [13 x i8] c"Hello World\0A\00", align 1
+
+define i32 @main() nounwind {
+entry:
+ %call = tail call i32 @puts(i8* getelementptr inbounds ([13 x i8]* @.str, i32 0, i32 0)) nounwind
+ tail call void bitcast (void (...)* @SomeOtherFunction to void ()*)() nounwind
+ ret i32 0
+}
+
+declare i32 @puts(i8* nocapture) nounwind
+
+declare void @SomeOtherFunction(...)
diff --git a/test/Object/nm-archive.test b/test/Object/nm-archive.test
index da6144e..8ed81bf 100644
--- a/test/Object/nm-archive.test
+++ b/test/Object/nm-archive.test
@@ -1,7 +1,8 @@
RUN: llvm-nm %p/TestObjectFiles/archive-test.a-coff-i386 \
RUN: | FileCheck %s -check-prefix COFF
-RUN: llvm-nm %p/TestObjectFiles/archive-test.a-bitcode \
-RUN: | FileCheck %s -check-prefix BITCODE
+RUN: llvm-as %p/TestObjectFiles/trivial.ll -o=%t1
+RUN: llvm-ar rcs %t2 %t1
+RUN: llvm-nm %t2 | FileCheck %s -check-prefix BITCODE
COFF: trivial-object-test.coff-i386: