Changeset View
Changeset View
Standalone View
Standalone View
test/Transforms/PruneEH/noinlineattr.ll
- This file was added.
; RUN: opt < %s -prune-eh -S | FileCheck %s | |||||
%class.MyException = type { i8 } | |||||
$_ZN11MyExceptionC2Ev = comdat any | |||||
@_ZTIi = external global i8* | |||||
; CHECK-LABEL: _Z7fCalleeii | |||||
; CHECK: call void @_ZN11MyExceptionC2Ev(%class.MyException* %0) [[ATTR_NUM:#[0-9]+]] | |||||
; CHECK: attributes [[ATTR_NUM]] = { noinline } | |||||
define i32 @_Z7fCalleeii(i32 %idx, i32 %limit) personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { | |||||
entry: | |||||
%cmp = icmp sge i32 %idx, %limit | |||||
br i1 %cmp, label %if.then, label %if.end | |||||
if.then: ; preds = %entry | |||||
%exception = call i8* @__cxa_allocate_exception(i64 1) #0 | |||||
%0 = bitcast i8* %exception to %class.MyException* | |||||
call void @_ZN11MyExceptionC2Ev(%class.MyException* %0) | |||||
br label %invoke.cont | |||||
invoke.cont: ; preds = %if.then | |||||
call void @__cxa_throw(i8* %exception, i8* bitcast (i8** @_ZTIi to i8*), i8* null) #1 | |||||
unreachable | |||||
if.end: ; preds = %entry | |||||
ret i32 %idx | |||||
} | |||||
; Function Attrs: nounwind | |||||
define linkonce_odr void @_ZN11MyExceptionC2Ev(%class.MyException* %this) unnamed_addr comdat align 2 { | |||||
entry: | |||||
ret void | |||||
} | |||||
declare i8* @__cxa_allocate_exception(i64) | |||||
declare i32 @__gxx_personality_v0(...) | |||||
declare void @__cxa_throw(i8*, i8*, i8*) | |||||
attributes #0 = { nounwind } | |||||
attributes #1 = { noreturn } |