Sam Clegg | 8bda508 | 2017-07-10 20:43:26 +0000 | [diff] [blame] | 1 | ; Input used for generating checked-in binaries (trivial-object-test.*) |
Sam Clegg | a590800 | 2018-05-10 17:49:11 +0000 | [diff] [blame] | 2 | ; llc -mtriple=wasm32-unknown-unknown trivial.ll -filetype=obj -o trivial-object-test.wasm |
Sam Clegg | 8bda508 | 2017-07-10 20:43:26 +0000 | [diff] [blame] | 3 | |
Michael J. Spencer | 8ab7b03 | 2011-10-25 22:30:58 +0000 | [diff] [blame] | 4 | @.str = private unnamed_addr constant [13 x i8] c"Hello World\0A\00", align 1 |
| 5 | |
| 6 | define i32 @main() nounwind { |
| 7 | entry: |
David Blaikie | f72d05b | 2015-03-13 18:20:45 +0000 | [diff] [blame] | 8 | %call = tail call i32 @puts(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i32 0, i32 0)) nounwind |
Michael J. Spencer | 8ab7b03 | 2011-10-25 22:30:58 +0000 | [diff] [blame] | 9 | tail call void bitcast (void (...)* @SomeOtherFunction to void ()*)() nounwind |
| 10 | ret i32 0 |
| 11 | } |
| 12 | |
| 13 | declare i32 @puts(i8* nocapture) nounwind |
| 14 | |
| 15 | declare void @SomeOtherFunction(...) |
Rafael Espindola | b674c17 | 2014-07-04 15:03:17 +0000 | [diff] [blame] | 16 | |
| 17 | @var = global i32 0 |
| 18 | @llvm.used = appending global [1 x i8*] [i8* bitcast (i32* @var to i8*)], section "llvm.metadata" |
Rafael Espindola | 2dc0d9b | 2014-07-04 19:08:22 +0000 | [diff] [blame] | 19 | @llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* null, i8* null }] |