From 93fe4ae091112769601a203bfcc288f52f778fef Mon Sep 17 00:00:00 2001 From: "Michael J. Spencer" Date: Tue, 25 Oct 2011 22:30:58 +0000 Subject: [PATCH] Object: change test to create archive. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142982 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../Object/TestObjectFiles/archive-test.a-bitcode | Bin 790 -> 0 bytes test/Object/TestObjectFiles/trivial.ll | 12 ++++++++++++ test/Object/nm-archive.test | 5 +++-- 3 files changed, 15 insertions(+), 2 deletions(-) delete mode 100644 test/Object/TestObjectFiles/archive-test.a-bitcode create mode 100644 test/Object/TestObjectFiles/trivial.ll diff --git a/test/Object/TestObjectFiles/archive-test.a-bitcode b/test/Object/TestObjectFiles/archive-test.a-bitcode deleted file mode 100644 index 3aeb34fa334257f953f121226bba8fdb5cccd8f4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 790 zcmZ8eO-vI}5T3T{zU@+A3k|jj;;UPUBu4vRYS6UZHM9{D6=R~8Zjlg!CI+NwxR_K=o=kdx=*8gKgU+s^fyumYX5KgNdz1IvLz&XO$t%2= z9vQhknjX6|n!XiJq(xuA7x4w7{y>D%a3~ZAA7U^_bqgD)gTez-$mFKVrQB>TlfRJ5 zT{O7A3ci4s(kR*?Mj|MQ77iV1D11WN`r@_$yaE7|0MLbzJQAPBcbOC`_@k?)s_pCv z&eg{}8&`#^=EQ1SqAK_ugPb$P`(;m(uertgP1WXdmpo*bvyZQ9>#@dx33XCV02X6g z^%vUdEyZM4DYrm>=%vL8%M_pkdH)&CO0x@9=$DgLYrovEO6~#An&3LgSzplUeXf>= zr%|)_+_qqMWLBmajZNKM@UY!4%Nv%Vjm5C~q&T_wFi9S)S)!k{uDvFEpph9$Dqd1D zl0vPcsF6AJCi_h#6~pySg;WGGs}W4FJa%L@Mk)#^YXp;ma+Fm%jk3!-rGd zyqQrk0o#opsz;!0j6wPP)@&~ONNvU1Kips>K3mI%f40AQx0l~E>wOstfZq+>O#Hka z8C*dTCM1{H>yYAww-x}Al?AS`v@I~hJ*^l3ZUMP2d~jqQ$GELctN`Zmj|s*Ar}oxc zz4sla%S+N=b!R1^lKD9@qxTf)pK*I)UijpM*0r$-b6px;ZI@r~2w%&>$KlZX>R`Lx G3cmsK8^=8W diff --git a/test/Object/TestObjectFiles/trivial.ll b/test/Object/TestObjectFiles/trivial.ll new file mode 100644 index 00000000000..25ece7611a3 --- /dev/null +++ b/test/Object/TestObjectFiles/trivial.ll @@ -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(...) diff --git a/test/Object/nm-archive.test b/test/Object/nm-archive.test index da6144ee712..8ed81bfaacc 100644 --- a/test/Object/nm-archive.test +++ b/test/Object/nm-archive.test @@ -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: