[PATCH] D138123: [Verifier][WinEH] Check funclet tokens on intrinsic calls that may lower to function calls
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 18 10:52:54 PST 2022
rnk added inline comments.
================
Comment at: llvm/lib/IR/Verifier.cpp:4909
/// Allow intrinsics to be verified in different ways.
void Verifier::visitIntrinsicCall(Intrinsic::ID ID, CallBase &Call) {
Function *IF = Call.getCalledFunction();
----------------
This property should be validated for invokes, calls, and callbr, right?
================
Comment at: llvm/lib/IR/Verifier.cpp:5757
+
+ // Verify funclet operand bundles for WinEH-like personalities
+ if (IntrinsicInst::mayLowerToFunctionCall(ID)) {
----------------
I think these comments should discuss the purpose of this verification. Maybe we can say:
```
// Verify that each function call belongs to exactly one funclet (or the main function),
// and that there aren't any unmediated control transfers between funclets.
```
================
Comment at: llvm/test/Transforms/ObjCARC/invoke-2.ll:42
tail call void @llvm.objc.end_catch(), !clang.arc.no_objc_arc_exceptions !0
- br label %eh.cont
+ catchret from %4 to label %eh.cont
}
----------------
sgraenitz wrote:
> The verifier already caught this, which I assume is a bug that sat here unnoticed for years -- `catchpad` without `catchret`?
Looks like a bug to me
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138123/new/
https://reviews.llvm.org/D138123
More information about the llvm-commits
mailing list