[PATCH] D25178: [CodeGen] Don't assume that a landing pad exists in setMustKeepGlobalVariables
David Majnemer via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 5 14:01:08 PDT 2016
majnemer added inline comments.
> GlobalMerge.cpp:513-521
> const LandingPadInst *LPInst = II->getUnwindDest()->getLandingPadInst();
> + if (!LPInst) continue;
> // Look for globals in the clauses of the landing pad instruction
> for (unsigned Idx = 0, NumClauses = LPInst->getNumClauses();
> Idx != NumClauses; ++Idx)
> if (const GlobalVariable *GV =
> dyn_cast<GlobalVariable>(LPInst->getClause(Idx)
This seems wrong. We should add cases for catchswitch & cleanuppad.
https://reviews.llvm.org/D25178
More information about the llvm-commits
mailing list