From: Nico Weber Date: Fri, 7 Jun 2019 16:06:27 +0000 (+0000) Subject: Attempt to fix nm-archive.test after r362798 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=957624db469c173854def38dcfe1d43918cc4358;p=llvm Attempt to fix nm-archive.test after r362798 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 --- diff --git a/test/Object/Inputs/small.ll b/test/Object/Inputs/small.ll new file mode 100644 index 00000000000..ef68a8c324a --- /dev/null +++ b/test/Object/Inputs/small.ll @@ -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 }] diff --git a/test/Object/nm-archive.test b/test/Object/nm-archive.test index a059e65853b..89e88fe3ee1 100644 --- a/test/Object/nm-archive.test +++ b/test/Object/nm-archive.test @@ -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