[llvm] e88a64f - [Docs] Update ExceptionHandling example (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 20 05:37:01 PDT 2023
Author: Nikita Popov
Date: 2023-09-20T14:36:52+02:00
New Revision: e88a64f7aba42d61289b9cefe3aecd9320ee640a
URL: https://github.com/llvm/llvm-project/commit/e88a64f7aba42d61289b9cefe3aecd9320ee640a
DIFF: https://github.com/llvm/llvm-project/commit/e88a64f7aba42d61289b9cefe3aecd9320ee640a.diff
LOG: [Docs] Update ExceptionHandling example (NFC)
Fix some syntax errors and use opaque pointers.
Added:
Modified:
llvm/docs/ExceptionHandling.rst
Removed:
################################################################################
diff --git a/llvm/docs/ExceptionHandling.rst b/llvm/docs/ExceptionHandling.rst
index c35491a5590cd7c..c2afb25c6ccd47d 100644
--- a/llvm/docs/ExceptionHandling.rst
+++ b/llvm/docs/ExceptionHandling.rst
@@ -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 at XZ"(%struct.Cleanup* nonnull %obj)
+ %call = invoke ptr @"??0Cleanup@@QEAA at 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 at XZ"(%struct.Cleanup* nonnull %obj) nounwind
+ call void @"??_DCleanup@@QEAA at 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 at XZ"(%struct.Cleanup* nonnull %obj) nounwind
- cleanupret %0 unwind label %lpad.catch
+ call void @"??1Cleanup@@QEAA at 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 at 8", i32 0, i32* %e]
+ %catch = catchpad within %1 [ptr @"??_R0H at 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
}
More information about the llvm-commits
mailing list