summaryrefslogtreecommitdiff
path: root/tools/bugpoint/ExtractFunction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/bugpoint/ExtractFunction.cpp')
-rw-r--r--tools/bugpoint/ExtractFunction.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/bugpoint/ExtractFunction.cpp b/tools/bugpoint/ExtractFunction.cpp
index 7808de545a..e6a98d945a 100644
--- a/tools/bugpoint/ExtractFunction.cpp
+++ b/tools/bugpoint/ExtractFunction.cpp
@@ -73,9 +73,7 @@ Module *BugDriver::deleteInstructionFromProgram(const Instruction *I,
Instruction *TheInst = RI; // Got the corresponding instruction!
// If this instruction produces a value, replace any users with null values
- if (TheInst->getType()->isStructTy())
- TheInst->replaceAllUsesWith(UndefValue::get(TheInst->getType()));
- else if (TheInst->getType() != Type::getVoidTy(I->getContext()))
+ if (TheInst->getType() != Type::getVoidTy(I->getContext()))
TheInst->replaceAllUsesWith(Constant::getNullValue(TheInst->getType()));
// Remove the instruction from the program.