forked from OSchip/llvm-project
No need to special-case structs here; structs are first-class now.
llvm-svn: 105442
This commit is contained in:
parent
1bcdf32d22
commit
ae8bb42f5b
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue