1 ; RUN: llc -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s
4 @_ZTIi = external constant i8*
6 ; Function is marked as nounwind but it still throws with __cxa_throw and
7 ; calls __cxa_call_unexpected.
8 ; Need to make sure that we do not only have a debug frame.
9 ; Function Attrs: noreturn nounwind
10 define void @_Z4funcv() local_unnamed_addr #0 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
12 %exception = tail call i8* @__cxa_allocate_exception(i64 4)
13 %0 = bitcast i8* %exception to i32*
14 store i32 100, i32* %0, align 16
15 invoke void @__cxa_throw(i8* %exception, i8* bitcast (i8** @_ZTIi to i8*), i8* null)
16 to label %unreachable unwind label %lpad
18 lpad: ; preds = %entry
19 %1 = landingpad { i8*, i32 }
20 filter [0 x i8*] zeroinitializer
21 %2 = extractvalue { i8*, i32 } %1, 0
22 tail call void @__cxa_call_unexpected(i8* %2)
25 unreachable: ; preds = %entry
27 ; CHECK-LABEL: _Z4funcv
28 ; CHECK-NOT: .debug_frame
29 ; CHECK: .cfi_personality
33 declare i8* @__cxa_allocate_exception(i64) local_unnamed_addr
35 declare void @__cxa_throw(i8*, i8*, i8*) local_unnamed_addr
37 declare i32 @__gxx_personality_v0(...)
39 declare void @__cxa_call_unexpected(i8*) local_unnamed_addr
42 attributes #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" "unsafe-fp-math"="false" "use-soft-float"="false" }