mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-27 00:21:03 +00:00
[WinEH] C++ EH state numbering fixes
Differential Revision: http://reviews.llvm.org/D9787 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237854 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -34,7 +34,7 @@ $"\01??_R0H@8" = comdat any
|
||||
; CHECK: entry:
|
||||
; CHECK: %i = alloca i32, align 4
|
||||
; CHECK: %f = alloca float, align 4
|
||||
; CHECK: call void (...) @llvm.frameescape(i32* %i, float* %f)
|
||||
; CHECK: call void (...) @llvm.frameescape(float* %f, i32* %i)
|
||||
; CHECK: invoke void @"\01?may_throw@@YAXXZ"()
|
||||
; CHECK: to label %invoke.cont unwind label %[[LPAD_LABEL:lpad[0-9]*]]
|
||||
|
||||
@@ -55,8 +55,8 @@ invoke.cont: ; preds = %entry
|
||||
; CHECK: landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
|
||||
; CHECK: catch i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H@8" to i8*)
|
||||
; CHECK: catch i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0M@8" to i8*)
|
||||
; CHECK: [[RECOVER:\%.+]] = call i8* (...) @llvm.eh.actions(i32 1, i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H@8" to i8*), i32 0, i8* (i8*, i8*)* @"\01?test@@YAXXZ.catch", i32 1, i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0M@8" to i8*), i32 1, i8* (i8*, i8*)* @"\01?test@@YAXXZ.catch.1")
|
||||
; CHECK: indirectbr i8* [[RECOVER]], [label %try.cont10, label %try.cont]
|
||||
; CHECK: [[RECOVER:\%.+]] = call i8* (...) @llvm.eh.actions(i32 1, i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H@8" to i8*), i32 1, i8* (i8*, i8*)* @"\01?test@@YAXXZ.catch.1", i32 1, i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0M@8" to i8*), i32 0, i8* (i8*, i8*)* @"\01?test@@YAXXZ.catch")
|
||||
; CHECK: indirectbr i8* [[RECOVER]], [label %try.cont, label %try.cont10]
|
||||
|
||||
lpad: ; preds = %entry
|
||||
%0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
|
||||
@@ -136,7 +136,16 @@ eh.resume: ; %catch.dispatch3
|
||||
|
||||
; CHECK: define internal i8* @"\01?test@@YAXXZ.catch"(i8*, i8*)
|
||||
; CHECK: entry:
|
||||
; CHECK: [[RECOVER_I:\%.+]] = call i8* @llvm.framerecover(i8* bitcast (void ()* @"\01?test@@YAXXZ" to i8*), i8* %1, i32 0)
|
||||
; CHECK: [[RECOVER_F1:\%.+]] = call i8* @llvm.framerecover(i8* bitcast (void ()* @"\01?test@@YAXXZ" to i8*), i8* %1, i32 0)
|
||||
; CHECK: [[F_PTR1:\%.+]] = bitcast i8* [[RECOVER_F1]] to float*
|
||||
; CHECK: [[TMP2:\%.+]] = load float, float* [[F_PTR1]], align 4
|
||||
; CHECK: call void @"\01?handle_float@@YAXM@Z"(float [[TMP2]])
|
||||
; CHECK: ret i8* blockaddress(@"\01?test@@YAXXZ", %try.cont10)
|
||||
; CHECK: }
|
||||
|
||||
; CHECK: define internal i8* @"\01?test@@YAXXZ.catch.1"(i8*, i8*)
|
||||
; CHECK: entry:
|
||||
; CHECK: [[RECOVER_I:\%.+]] = call i8* @llvm.framerecover(i8* bitcast (void ()* @"\01?test@@YAXXZ" to i8*), i8* %1, i32 1)
|
||||
; CHECK: [[I_PTR:\%.+]] = bitcast i8* [[RECOVER_I]] to i32*
|
||||
; CHECK: [[TMP1:\%.+]] = load i32, i32* [[I_PTR]], align 4
|
||||
; CHECK: invoke void @"\01?handle_int@@YAXH@Z"(i32 [[TMP1]])
|
||||
@@ -148,20 +157,11 @@ eh.resume: ; %catch.dispatch3
|
||||
; CHECK: [[LPAD1_LABEL]]:{{[ ]+}}; preds = %entry
|
||||
; CHECK: [[LPAD1_VAL:\%.+]] = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
|
||||
; CHECK: catch i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0M@8" to i8*)
|
||||
; CHECK: [[RECOVER1:\%.+]] = call i8* (...) @llvm.eh.actions(i32 1, i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0M@8" to i8*), i32 1, i8* (i8*, i8*)* @"\01?test@@YAXXZ.catch.1")
|
||||
; CHECK: [[RECOVER1:\%.+]] = call i8* (...) @llvm.eh.actions(i32 1, i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0M@8" to i8*), i32 0, i8* (i8*, i8*)* @"\01?test@@YAXXZ.catch")
|
||||
; CHECK: indirectbr i8* [[RECOVER1]], []
|
||||
;
|
||||
; CHECK: }
|
||||
|
||||
; CHECK: define internal i8* @"\01?test@@YAXXZ.catch.1"(i8*, i8*)
|
||||
; CHECK: entry:
|
||||
; CHECK: [[RECOVER_F1:\%.+]] = call i8* @llvm.framerecover(i8* bitcast (void ()* @"\01?test@@YAXXZ" to i8*), i8* %1, i32 1)
|
||||
; CHECK: [[F_PTR1:\%.+]] = bitcast i8* [[RECOVER_F1]] to float*
|
||||
; CHECK: [[TMP2:\%.+]] = load float, float* [[F_PTR1]], align 4
|
||||
; CHECK: call void @"\01?handle_float@@YAXM@Z"(float [[TMP2]])
|
||||
; CHECK: ret i8* blockaddress(@"\01?test@@YAXXZ", %try.cont10)
|
||||
; CHECK: }
|
||||
|
||||
|
||||
declare void @"\01?may_throw@@YAXXZ"() #1
|
||||
|
||||
|
Reference in New Issue
Block a user