OSDN Git Service

Attempt to fix nm-archive.test after r362798
authorNico Weber <nicolasweber@gmx.de>
Fri, 7 Jun 2019 16:06:27 +0000 (16:06 +0000)
committerNico Weber <nicolasweber@gmx.de>
Fri, 7 Jun 2019 16:06:27 +0000 (16:06 +0000)
llvm-lib now needs a `target triple` for bitcode, so add a new file
that's like trivial.ll but has one, and use that in the test.
(trivial.ll had a comment that looked like it wasn't supposed to be used
in tests directly, so I don't want to change that file.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362809 91177308-0d34-0410-b5e6-96231b3b80d8

test/Object/Inputs/small.ll [new file with mode: 0644]
test/Object/nm-archive.test

diff --git a/test/Object/Inputs/small.ll b/test/Object/Inputs/small.ll
new file mode 100644 (file)
index 0000000..ef68a8c
--- /dev/null
@@ -0,0 +1,18 @@
+target triple = "i386-pc-windows"
+
+@.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], [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(...)
+
+@var = global i32 0
+@llvm.used = appending global [1 x i8*] [i8* bitcast (i32* @var to i8*)], section "llvm.metadata"
+@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* null, i8* null }]
index a059e65..89e88fe 100644 (file)
@@ -19,7 +19,7 @@ COFF-o: {{.*}}/archive-test.a-coff-i386:trivial-object-test.coff-i386:
 COFF-o: {{.*}}/archive-test.a-coff-i386:trivial-object-test.coff-i386: 00000000 T _main
 COFF-o: {{.*}}/archive-test.a-coff-i386:trivial-object-test.coff-i386:          U _puts
 
-RUN: llvm-as %p/Inputs/trivial.ll -o=%t1
+RUN: llvm-as %p/Inputs/small.ll -o=%t1
 RUN: rm -f %t2
 RUN: llvm-ar rcs %t2 %t1
 RUN: llvm-nm %t2 | FileCheck %s -check-prefix BITCODE