Object: change test to create archive.
authorMichael J. Spencer <bigcheesegs@gmail.com>
Tue, 25 Oct 2011 22:30:58 +0000 (22:30 +0000)
committerMichael J. Spencer <bigcheesegs@gmail.com>
Tue, 25 Oct 2011 22:30:58 +0000 (22:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142982 91177308-0d34-0410-b5e6-96231b3b80d8

test/Object/TestObjectFiles/archive-test.a-bitcode [deleted file]
test/Object/TestObjectFiles/trivial.ll [new file with mode: 0644]
test/Object/nm-archive.test

diff --git a/test/Object/TestObjectFiles/archive-test.a-bitcode b/test/Object/TestObjectFiles/archive-test.a-bitcode
deleted file mode 100644 (file)
index 3aeb34f..0000000
Binary files a/test/Object/TestObjectFiles/archive-test.a-bitcode and /dev/null differ
diff --git a/test/Object/TestObjectFiles/trivial.ll b/test/Object/TestObjectFiles/trivial.ll
new file mode 100644 (file)
index 0000000..25ece76
--- /dev/null
@@ -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(...)
index da6144ee712db26e9685756dcb529524fc9c370b..8ed81bfaaccd076d9cea5337f43d7aed89208e35 100644 (file)
@@ -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: