[llvm-commits] [llvm] r105442 - /llvm/trunk/tools/bugpoint/ExtractFunction.cpp
Dan Gohman
gohman at apple.com
Thu Jun 3 17:18:06 PDT 2010
Author: djg
Date: Thu Jun 3 19:18:06 2010
New Revision: 105442
URL: http://llvm.org/viewvc/llvm-project?rev=105442&view=rev
Log:
No need to special-case structs here; structs are first-class now.
Modified:
llvm/trunk/tools/bugpoint/ExtractFunction.cpp
Modified: llvm/trunk/tools/bugpoint/ExtractFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/ExtractFunction.cpp?rev=105442&r1=105441&r2=105442&view=diff
==============================================================================
--- llvm/trunk/tools/bugpoint/ExtractFunction.cpp (original)
+++ llvm/trunk/tools/bugpoint/ExtractFunction.cpp Thu Jun 3 19:18:06 2010
@@ -73,9 +73,7 @@
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.
More information about the llvm-commits
mailing list