diff --git a/lib/Transforms/Scalar/SCCP.cpp b/lib/Transforms/Scalar/SCCP.cpp index d1b0d2547e2..58d769b2f02 100644 --- a/lib/Transforms/Scalar/SCCP.cpp +++ b/lib/Transforms/Scalar/SCCP.cpp @@ -1603,7 +1603,7 @@ bool SCCP::runOnFunction(Function &F) { DEBUG(dbgs() << " BasicBlock Dead:" << *BB); ++NumDeadBlocks; - NumInstRemoved += removeAllNonTerminatorAndEHPadInstructions(BB); + NumInstRemoved += removeAllNonTerminatorAndEHPadInstructions(&*BB); MadeChanges = true; continue;