[llvm] r362809 - Attempt to fix nm-archive.test after r362798

Nico Weber via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 7 09:06:28 PDT 2019


Author: nico
Date: Fri Jun  7 09:06:27 2019
New Revision: 362809

URL: http://llvm.org/viewvc/llvm-project?rev=362809&view=rev
Log:
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.)

Added:
    llvm/trunk/test/Object/Inputs/small.ll
Modified:
    llvm/trunk/test/Object/nm-archive.test

Added: llvm/trunk/test/Object/Inputs/small.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/Inputs/small.ll?rev=362809&view=auto
==============================================================================
--- llvm/trunk/test/Object/Inputs/small.ll (added)
+++ llvm/trunk/test/Object/Inputs/small.ll Fri Jun  7 09:06:27 2019
@@ -0,0 +1,18 @@
+target triple = "i386-pc-windows"
+
+ at .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(...)
+
+ at var = global i32 0
+ at llvm.used = appending global [1 x i8*] [i8* bitcast (i32* @var to i8*)], section "llvm.metadata"
+ at llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* null, i8* null }]

Modified: llvm/trunk/test/Object/nm-archive.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/nm-archive.test?rev=362809&r1=362808&r2=362809&view=diff
==============================================================================
--- llvm/trunk/test/Object/nm-archive.test (original)
+++ llvm/trunk/test/Object/nm-archive.test Fri Jun  7 09:06:27 2019
@@ -19,7 +19,7 @@ COFF-o: {{.*}}/archive-test.a-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




More information about the llvm-commits mailing list