Fix LLVM template
This commit is contained in:
parent
3488cffaec
commit
2a915e2654
|
@ -1000,26 +1000,15 @@ PLEASE GIVE UP
|
|||
main: "main.ll",
|
||||
compile: "clang -Wno-override-module main.ll -o main",
|
||||
run: "./main",
|
||||
template: `; Copied directly from the documentation
|
||||
; Declare the string constant as a global constant.
|
||||
@.str = private unnamed_addr constant [13 x i8] c"hello world\\0A\\00"
|
||||
template: `@.str = private unnamed_addr constant [13 x i8] c"Hello, world!"
|
||||
|
||||
; External declaration of the puts function
|
||||
declare i32 @puts(i8* nocapture) nounwind
|
||||
|
||||
; Definition of main function
|
||||
define i32 @main() { ; i32()*
|
||||
; Convert [13 x i8]* to i8 *...
|
||||
define i32 @main() {
|
||||
%cast210 = getelementptr [13 x i8],[13 x i8]* @.str, i64 0, i64 0
|
||||
|
||||
; Call puts function to write out the string to stdout.
|
||||
call i32 @puts(i8* %cast210)
|
||||
ret i32 0
|
||||
}
|
||||
|
||||
; Named metadata
|
||||
!0 = !{i32 42, null, !"string"}
|
||||
!foo = !{!0}
|
||||
`,
|
||||
},
|
||||
lolcode: {
|
||||
|
|
Loading…
Reference in New Issue