[Docs] Update ExceptionHandling example (NFC)
Fix some syntax errors and use opaque pointers.
This commit is contained in:
parent
765b38fbf1
commit
e88a64f7ab
@ -601,11 +601,11 @@ all of the new IR instructions:
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
define i32 @f() nounwind personality i32 (...)* @__CxxFrameHandler3 {
|
||||
define i32 @f() nounwind personality ptr @__CxxFrameHandler3 {
|
||||
entry:
|
||||
%obj = alloca %struct.Cleanup, align 4
|
||||
%e = alloca i32, align 4
|
||||
%call = invoke %struct.Cleanup* @"??0Cleanup@@QEAA@XZ"(%struct.Cleanup* nonnull %obj)
|
||||
%call = invoke ptr @"??0Cleanup@@QEAA@XZ"(ptr nonnull %obj)
|
||||
to label %invoke.cont unwind label %lpad.catch
|
||||
|
||||
invoke.cont: ; preds = %entry
|
||||
@ -613,7 +613,7 @@ all of the new IR instructions:
|
||||
to label %invoke.cont.2 unwind label %lpad.cleanup
|
||||
|
||||
invoke.cont.2: ; preds = %invoke.cont
|
||||
call void @"??_DCleanup@@QEAA@XZ"(%struct.Cleanup* nonnull %obj) nounwind
|
||||
call void @"??_DCleanup@@QEAA@XZ"(ptr nonnull %obj) nounwind
|
||||
br label %return
|
||||
|
||||
return: ; preds = %invoke.cont.3, %invoke.cont.2
|
||||
@ -622,24 +622,24 @@ all of the new IR instructions:
|
||||
|
||||
lpad.cleanup: ; preds = %invoke.cont.2
|
||||
%0 = cleanuppad within none []
|
||||
call void @"??1Cleanup@@QEAA@XZ"(%struct.Cleanup* nonnull %obj) nounwind
|
||||
cleanupret %0 unwind label %lpad.catch
|
||||
call void @"??1Cleanup@@QEAA@XZ"(ptr nonnull %obj) nounwind
|
||||
cleanupret from %0 unwind label %lpad.catch
|
||||
|
||||
lpad.catch: ; preds = %lpad.cleanup, %entry
|
||||
%1 = catchswitch within none [label %catch.body] unwind label %lpad.terminate
|
||||
|
||||
catch.body: ; preds = %lpad.catch
|
||||
%catch = catchpad within %1 [%rtti.TypeDescriptor2* @"??_R0H@8", i32 0, i32* %e]
|
||||
%catch = catchpad within %1 [ptr @"??_R0H@8", i32 0, ptr %e]
|
||||
invoke void @"?may_throw@@YAXXZ"()
|
||||
to label %invoke.cont.3 unwind label %lpad.terminate
|
||||
|
||||
invoke.cont.3: ; preds = %catch.body
|
||||
%3 = load i32, i32* %e, align 4
|
||||
%3 = load i32, ptr %e, align 4
|
||||
catchret from %catch to label %return
|
||||
|
||||
lpad.terminate: ; preds = %catch.body, %lpad.catch
|
||||
cleanuppad within none []
|
||||
call void @"?terminate@@YAXXZ"
|
||||
call void @"?terminate@@YAXXZ"()
|
||||
unreachable
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user