summaryrefslogtreecommitdiff
path: root/lib/Transforms/Scalar/GCSE.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms/Scalar/GCSE.cpp')
-rw-r--r--lib/Transforms/Scalar/GCSE.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/GCSE.cpp b/lib/Transforms/Scalar/GCSE.cpp
index 94cdcb1400..9d3f1a8750 100644
--- a/lib/Transforms/Scalar/GCSE.cpp
+++ b/lib/Transforms/Scalar/GCSE.cpp
@@ -201,5 +201,5 @@ void GCSE::ReplaceInstructionWith(Instruction *I, Value *V) {
}
// Erase the instruction from the program.
- I->getParent()->getInstList().erase(I);
+ I->eraseFromParent();
}