[llvm] [WinEH] Emit unreachable on malformed catchpad (PR #222181)
Eli Friedman via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 22 10:48:32 PDT 2026
================
@@ -58,6 +61,60 @@ static cl::opt<bool> DemoteCatchSwitchPHIOnlyOpt(
"demote-catchswitch-only", cl::Hidden,
cl::desc("Demote catchswitch BBs only (for wasm EH)"), cl::init(false));
+static bool isMalformedCatchpad(const CatchPadInst *CPI,
+ EHPersonality Personality) {
+ switch (Personality) {
+ case EHPersonality::MSVC_CXX: {
+ if (CPI->arg_size() != 3)
+ return true;
+
+ Constant *TypeInfo;
+ GlobalVariable *TypeDescriptor;
+ ConstantInt *Adjectives;
----------------
efriedma-quic wrote:
Variable assigned but not read.
https://github.com/llvm/llvm-project/pull/222181
More information about the llvm-commits
mailing list