37 lines
1.8 KiB
LLVM
37 lines
1.8 KiB
LLVM
; ModuleID = 'assert_x86.c'
|
|
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
|
target triple = "x86_64-pc-linux-gnu"
|
|
|
|
@.str = private unnamed_addr constant [71 x i8] c"Exception in thread \22main\22 java.lang.AssertionError: Assertion failed\0A\00", align 1
|
|
|
|
; Function Attrs: nounwind uwtable
|
|
define void @assert_c(i32 %value) #0 {
|
|
%1 = alloca i32, align 4
|
|
store i32 %value, i32* %1, align 4
|
|
%2 = load i32* %1, align 4
|
|
%3 = icmp ne i32 %2, 0
|
|
br i1 %3, label %6, label %4
|
|
|
|
; <label>:4 ; preds = %0
|
|
%5 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([71 x i8]* @.str, i32 0, i32 0))
|
|
call void @abort() #3
|
|
unreachable
|
|
|
|
; <label>:6 ; preds = %0
|
|
ret void
|
|
}
|
|
|
|
declare i32 @printf(i8*, ...) #1
|
|
|
|
; Function Attrs: noreturn nounwind
|
|
declare void @abort() #2
|
|
|
|
attributes #0 = { nounwind 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 = { "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 = { noreturn 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 #3 = { noreturn nounwind }
|
|
|
|
!llvm.ident = !{!0}
|
|
|
|
!0 = !{!"Ubuntu clang version 3.6.2-3ubuntu2 (tags/RELEASE_362/final) (based on LLVM 3.6.2)"}
|