diff options
author | Chris Lattner <sabre@nondot.org> | 2008-04-28 00:04:58 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-04-28 00:04:58 +0000 |
commit | 7855a5cb70d42e48e691fbca273e8c3edbbda7f1 (patch) | |
tree | 116608b7bf5c4d1c79d8ccde99ba0476e78968a3 /llvm/tools/bugpoint/ExtractFunction.cpp | |
parent | d04b818a91aa5dcb78165f5d3ff5502f99090f45 (diff) | |
download | bcm5719-llvm-7855a5cb70d42e48e691fbca273e8c3edbbda7f1.tar.gz bcm5719-llvm-7855a5cb70d42e48e691fbca273e8c3edbbda7f1.zip |
several multiple-retval fixes for bugpoint.
llvm-svn: 50331
Diffstat (limited to 'llvm/tools/bugpoint/ExtractFunction.cpp')
-rw-r--r-- | llvm/tools/bugpoint/ExtractFunction.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/tools/bugpoint/ExtractFunction.cpp b/llvm/tools/bugpoint/ExtractFunction.cpp index 906826e0e5b..ca8a279153f 100644 --- a/llvm/tools/bugpoint/ExtractFunction.cpp +++ b/llvm/tools/bugpoint/ExtractFunction.cpp @@ -71,7 +71,9 @@ 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() != Type::VoidTy) + if (isa<StructType>(TheInst->getType())) + TheInst->replaceAllUsesWith(UndefValue::get(TheInst->getType())); + else if (TheInst->getType() != Type::VoidTy) TheInst->replaceAllUsesWith(Constant::getNullValue(TheInst->getType())); // Remove the instruction from the program. |