Do not allow exception handling code in SCoPs

llvm-svn: 265883
This commit is contained in:
Johannes Doerfert 2016-04-09 21:55:58 +00:00
parent 3c6a99b818
commit 81c41b99a7
1 changed files with 3 additions and 0 deletions

View File

@ -994,6 +994,9 @@ bool ScopDetection::isValidInstruction(Instruction &Inst,
return false;
}
if (isa<LandingPadInst>(&Inst) || isa<ResumeInst>(&Inst))
return false;
// We only check the call instruction but not invoke instruction.
if (CallInst *CI = dyn_cast<CallInst>(&Inst)) {
if (isValidCallInst(*CI, Context))