mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-29 06:30:39 +00:00
No need to special-case structs here; structs are first-class now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105442 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d089a7ac70
commit
b304ba94db
@ -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
Block a user