aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Transforms/Scalar/InstructionCombining.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp
index d1b12b2046..4af6c1c41f 100644
--- a/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -11344,7 +11344,7 @@ Instruction *InstCombiner::visitFree(Instruction &FI) {
return EraseInstFromFunction(FI);
// If we have a malloc call whose only use is a free call, delete both.
- if (isMalloc(Op))
+ if (isMalloc(Op)) {
if (CallInst* CI = extractMallocCallFromBitCast(Op)) {
if (Op->hasOneUse() && CI->hasOneUse()) {
EraseInstFromFunction(FI);
@@ -11358,6 +11358,7 @@ Instruction *InstCombiner::visitFree(Instruction &FI) {
return EraseInstFromFunction(*cast<Instruction>(Op));
}
}
+ }
return 0;
}