43 lines · plain
1; RUN: llc -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s2 3 4@_ZTIi = external constant ptr5 6; Function is marked as nounwind but it still throws with __cxa_throw and7; calls __cxa_call_unexpected.8; Need to make sure that we do not only have a debug frame.9; Function Attrs: noreturn nounwind10define void @_Z4funcv() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {11entry:12 %exception = tail call ptr @__cxa_allocate_exception(i64 4)13 store i32 100, ptr %exception, align 1614 invoke void @__cxa_throw(ptr %exception, ptr @_ZTIi, ptr null)15 to label %unreachable unwind label %lpad16 17lpad: ; preds = %entry18 %0 = landingpad { ptr, i32 }19 filter [0 x ptr] zeroinitializer20 %1 = extractvalue { ptr, i32 } %0, 021 tail call void @__cxa_call_unexpected(ptr %1)22 unreachable23 24unreachable: ; preds = %entry25 unreachable26; CHECK-LABEL: _Z4funcv27; CHECK-NOT: .debug_frame28; CHECK: .cfi_personality29; CHECK: .cfi_endproc30}31 32declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr33 34declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr35 36declare i32 @__gxx_personality_v0(...)37 38declare void @__cxa_call_unexpected(ptr) local_unnamed_addr39 40 41attributes #0 = { noreturn nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="none" "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" "use-soft-float"="false" }42 43