Eric Christopher | 9cad53c | 2013-04-03 18:31:38 +0000 | [diff] [blame] | 1 | ; llc -mtriple=i386-pc-win32 trivial.ll -filetype=obj -o trivial-object-test.coff-i386 |
| 2 | ; llc -mtriple=x86_64-pc-win32 trivial.ll -filetype=obj -o trivial-object-test.coff-x86-64 |
| 3 | ; llc -mtriple=i386-linux-gnu trivial.ll -filetype=obj -o trivial-object-test.elf-i386 -relocation-model=pic |
| 4 | ; llc -mtriple=x86_64-linux-gnu trivial.ll -filetype=obj -o trivial-object-test.elf-x86-64 -relocation-model=pic |
| 5 | ; llc -mtriple=i386-apple-darwin10 trivial.ll -filetype=obj -o trivial-object-test.macho-i386 -relocation-model=pic |
| 6 | ; llc -mtriple=x86_64-apple-darwin10 trivial.ll -filetype=obj -o trivial-object-test.macho-x86-64 -relocation-model=pic |
| 7 | |
| 8 | @.str = private unnamed_addr constant [13 x i8] c"Hello World\0A\00", align 1 |
| 9 | |
| 10 | define i32 @main() nounwind { |
| 11 | entry: |
David Blaikie | f72d05b | 2015-03-13 18:20:45 +0000 | [diff] [blame^] | 12 | %call = tail call i32 @puts(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i32 0, i32 0)) nounwind |
Eric Christopher | 9cad53c | 2013-04-03 18:31:38 +0000 | [diff] [blame] | 13 | tail call void bitcast (void (...)* @SomeOtherFunction to void ()*)() nounwind |
| 14 | ret i32 0 |
| 15 | } |
| 16 | |
| 17 | declare i32 @puts(i8* nocapture) nounwind |
| 18 | |
| 19 | declare void @SomeOtherFunction(...) |