getParent() ^ 3 == getModule() ; NFCI
[oota-llvm.git] / lib / Transforms / InstCombine / InstructionCombining.cpp
index 74c5148f9f89fc44bf5fc77eba46e4a38fc46195..6cd61edfb6f0431f5ef32ee0bff3affcd798f7ed 100644 (file)
@@ -1962,7 +1962,7 @@ Instruction *InstCombiner::visitAllocSite(Instruction &MI) {
 
     if (InvokeInst *II = dyn_cast<InvokeInst>(&MI)) {
       // Replace invoke with a NOP intrinsic to maintain the original CFG
-      Module *M = II->getParent()->getParent()->getParent();
+      Module *M = II->getModule();
       Function *F = Intrinsic::getDeclaration(M, Intrinsic::donothing);
       InvokeInst::Create(F, II->getNormalDest(), II->getUnwindDest(),
                          None, "", II->getParent());