blob: 82eabc6389fb845522a176a528388d939bf55b6d [file] [log] [blame]
Sam Clegg8bda5082017-07-10 20:43:26 +00001; Input used for generating checked-in binaries (trivial-object-test.*)
Sam Clegga5908002018-05-10 17:49:11 +00002; llc -mtriple=wasm32-unknown-unknown trivial.ll -filetype=obj -o trivial-object-test.wasm
Sam Clegg8bda5082017-07-10 20:43:26 +00003
Michael J. Spencer8ab7b032011-10-25 22:30:58 +00004@.str = private unnamed_addr constant [13 x i8] c"Hello World\0A\00", align 1
5
6define i32 @main() nounwind {
7entry:
David Blaikief72d05b2015-03-13 18:20:45 +00008 %call = tail call i32 @puts(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i32 0, i32 0)) nounwind
Michael J. Spencer8ab7b032011-10-25 22:30:58 +00009 tail call void bitcast (void (...)* @SomeOtherFunction to void ()*)() nounwind
10 ret i32 0
11}
12
13declare i32 @puts(i8* nocapture) nounwind
14
15declare void @SomeOtherFunction(...)
Rafael Espindolab674c172014-07-04 15:03:17 +000016
17@var = global i32 0
18@llvm.used = appending global [1 x i8*] [i8* bitcast (i32* @var to i8*)], section "llvm.metadata"
Rafael Espindola2dc0d9b2014-07-04 19:08:22 +000019@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* null, i8* null }]