diff --git a/llvm/test/Object/Inputs/small.ll b/llvm/test/Object/Inputs/small.ll new file mode 100644 index 000000000000..ef68a8c324a3 --- /dev/null +++ b/llvm/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/llvm/test/Object/nm-archive.test b/llvm/test/Object/nm-archive.test index a059e65853bb..89e88fe3ee14 100644 --- a/llvm/test/Object/nm-archive.test +++ b/llvm/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