JustPaste.it
User avatar
@anonymous · Aug 18, 2017

; ModuleID = 'test.cpp'
source_filename = "test.cpp"
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

$__clang_call_terminate = comdat any

@.str = private unnamed_addr constant [7 x i8] c"AAA !\0A\00", align 1
@_ZTIi = external constant i8*

define internal i32 @personality_routine(...) {
%1 = alloca i32, align 4
%2 = alloca i8*
%3 = alloca i32
store i32 0, i32* %1, align 4
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i32 0, i32 0))
call void @_ZSt9terminatev() #5
unreachable
}

; Function Attrs: noinline norecurse optnone uwtable
define i32 @main() #0 personality i8* bitcast (i32 (...)* @personality_routine to i8*) {
%1 = alloca i32, align 4
%2 = alloca i8*
%3 = alloca i32
store i32 0, i32* %1, align 4
%4 = call i8* @__cxa_allocate_exception(i64 4) #1
%5 = bitcast i8* %4 to i32*
store i32 1, i32* %5, align 16
invoke void @__cxa_throw(i8* %4, i8* bitcast (i8** @_ZTIi to i8*), i8* null) #2
to label %14 unwind label %6

; <label>:6: ; preds = %0
%7 = landingpad { i8*, i32 }
catch i8* null
%8 = extractvalue { i8*, i32 } %7, 0
store i8* %8, i8** %2, align 8
%9 = extractvalue { i8*, i32 } %7, 1
store i32 %9, i32* %3, align 4
br label %10

; <label>:10: ; preds = %6
%11 = load i8*, i8** %2, align 8
%12 = call i8* @__cxa_begin_catch(i8* %11) #1
call void @__cxa_end_catch()
br label %13

; <label>:13: ; preds = %10
ret i32 0

; <label>:14: ; preds = %0
unreachable
}

declare i8* @__cxa_allocate_exception(i64)

declare void @__cxa_throw(i8*, i8*, i8*)

declare i8* @__cxa_begin_catch(i8*)

declare i32 @printf(i8*, ...) #1

declare void @__cxa_end_catch()


declare void @_ZSt9terminatev()

attributes #0 = { noinline norecurse optnone uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #1 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "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" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #2 = { noinline noreturn nounwind }
attributes #3 = { nounwind }
attributes #4 = { noreturn }
attributes #5 = { noreturn nounwind }

!llvm.module.flags = !{!0}
!llvm.ident = !{!1}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 6.0.0 (trunk 310596)"}