diff options
author | Owen Anderson <resistor@mac.com> | 2009-08-13 21:58:54 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-08-13 21:58:54 +0000 |
commit | 1d0be15f89cb5056e20e2d24faa8d6afb1573bca (patch) | |
tree | 2cdabe223bfce83bd12e10dd557147a2f68c9bf8 /tools/bugpoint/CrashDebugger.cpp | |
parent | d163e8b14c8aa5bbbb129e3f0dffdbe7213a3c72 (diff) | |
download | llvm-1d0be15f89cb5056e20e2d24faa8d6afb1573bca.tar.gz llvm-1d0be15f89cb5056e20e2d24faa8d6afb1573bca.tar.bz2 llvm-1d0be15f89cb5056e20e2d24faa8d6afb1573bca.tar.xz |
Push LLVMContexts through the IntegerType APIs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78948 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/bugpoint/CrashDebugger.cpp')
-rw-r--r-- | tools/bugpoint/CrashDebugger.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/bugpoint/CrashDebugger.cpp b/tools/bugpoint/CrashDebugger.cpp index 9d4e98ca50..4e15732b6e 100644 --- a/tools/bugpoint/CrashDebugger.cpp +++ b/tools/bugpoint/CrashDebugger.cpp @@ -297,12 +297,13 @@ bool ReduceCrashingBlocks::TestBlocks(std::vector<const BasicBlock*> &BBs) { if (isa<StructType>(BBTerm->getType())) BBTerm->replaceAllUsesWith(UndefValue::get(BBTerm->getType())); - else if (BB->getTerminator()->getType() != Type::VoidTy) + else if (BB->getTerminator()->getType() != + Type::getVoidTy(BB->getContext())) BBTerm->replaceAllUsesWith(Constant::getNullValue(BBTerm->getType())); // Replace the old terminator instruction. BB->getInstList().pop_back(); - new UnreachableInst(BB); + new UnreachableInst(BB->getContext(), BB); } // The CFG Simplifier pass may delete one of the basic blocks we are @@ -332,7 +333,7 @@ bool ReduceCrashingBlocks::TestBlocks(std::vector<const BasicBlock*> &BBs) { for (unsigned i = 0, e = BlockInfo.size(); i != e; ++i) { ValueSymbolTable &ST = BlockInfo[i].first->getValueSymbolTable(); Value* V = ST.lookup(BlockInfo[i].second); - if (V && V->getType() == Type::LabelTy) + if (V && V->getType() == Type::getLabelTy(V->getContext())) BBs.push_back(cast<BasicBlock>(V)); } return true; @@ -390,7 +391,7 @@ bool ReduceCrashingInstructions::TestInsts(std::vector<const Instruction*> for (BasicBlock::iterator I = FI->begin(), E = FI->end(); I != E;) { Instruction *Inst = I++; if (!Instructions.count(Inst) && !isa<TerminatorInst>(Inst)) { - if (Inst->getType() != Type::VoidTy) + if (Inst->getType() != Type::getVoidTy(Inst->getContext())) Inst->replaceAllUsesWith(UndefValue::get(Inst->getType())); Inst->eraseFromParent(); } |