We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2820235 commit 425726dCopy full SHA for 425726d
llvm/tools/bugpoint/TestPasses.cpp
@@ -44,14 +44,15 @@ namespace {
44
45
namespace {
46
/// DeleteCalls - This pass is used to test bugpoint. It intentionally
47
- /// deletes all call instructions, "misoptimizing" the program.
+ /// deletes some call instructions, "misoptimizing" the program.
48
class DeleteCalls : public BasicBlockPass {
49
bool runOnBasicBlock(BasicBlock &BB) {
50
for (BasicBlock::iterator I = BB.begin(), E = BB.end(); I != E; ++I)
51
if (CallInst *CI = dyn_cast<CallInst>(I)) {
52
if (!CI->use_empty())
53
CI->replaceAllUsesWith(Constant::getNullValue(CI->getType()));
54
CI->getParent()->getInstList().erase(CI);
55
+ break;
56
}
57
return false;
58
0 commit comments