mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-20 16:17:38 +00:00
several multiple-retval fixes for bugpoint.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50331 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user