diff options
Diffstat (limited to 'notes/annotations/hello.ll')
| -rw-r--r-- | notes/annotations/hello.ll | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/notes/annotations/hello.ll b/notes/annotations/hello.ll new file mode 100644 index 00000000..3b0381e1 --- /dev/null +++ b/notes/annotations/hello.ll @@ -0,0 +1,30 @@ +; ModuleID = 'hello.c' +target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-apple-macosx10.9.0" + +@.str = private unnamed_addr constant [13 x i8] c"Hello World\0A\00", align 1 + +; Function Attrs: nounwind ssp uwtable +define i32 @main(i32 %a) #0 { + %1 = icmp sgt i32 %a, 0 + br i1 %1, label %2, label %4 + +; <label>:2 ; preds = %0 + %3 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([13 x i8]* @.str, i64 0, i64 0)) #2 + br label %4 + +; <label>:4 ; preds = %2, %0 + %.0 = phi i32 [ %3, %2 ], [ 0, %0 ] + ret i32 %.0 +} + +; Function Attrs: nounwind +declare i32 @printf(i8* nocapture readonly, ...) #1 + +attributes #0 = { nounwind ssp uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" } +attributes #1 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" } +attributes #2 = { nounwind } + +!llvm.ident = !{!0} + +!0 = metadata !{metadata !"Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn)"} |
