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 | 55f1c09e31cfc6744fb682e17a2a1a00d914694c (patch) | |
| tree | e753e20c7186dc8138bef58089274bb5162a7cef /llvm/tools/bugpoint/ExtractFunction.cpp | |
| parent | 41a750271b72216801366693bd0f41672892c487 (diff) | |
| download | bcm5719-llvm-55f1c09e31cfc6744fb682e17a2a1a00d914694c.tar.gz bcm5719-llvm-55f1c09e31cfc6744fb682e17a2a1a00d914694c.zip | |
Push LLVMContexts through the IntegerType APIs.
llvm-svn: 78948
Diffstat (limited to 'llvm/tools/bugpoint/ExtractFunction.cpp')
| -rw-r--r-- | llvm/tools/bugpoint/ExtractFunction.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/tools/bugpoint/ExtractFunction.cpp b/llvm/tools/bugpoint/ExtractFunction.cpp index 684dde3538d..9fdcc1bdea2 100644 --- a/llvm/tools/bugpoint/ExtractFunction.cpp +++ b/llvm/tools/bugpoint/ExtractFunction.cpp @@ -73,7 +73,7 @@ Module *BugDriver::deleteInstructionFromProgram(const Instruction *I, // If this instruction produces a value, replace any users with null values if (isa<StructType>(TheInst->getType())) TheInst->replaceAllUsesWith(UndefValue::get(TheInst->getType())); - else if (TheInst->getType() != Type::VoidTy) + else if (TheInst->getType() != Type::getVoidTy(I->getContext())) TheInst->replaceAllUsesWith(Constant::getNullValue(TheInst->getType())); // Remove the instruction from the program. @@ -184,7 +184,8 @@ static Constant *GetTorInit(std::vector<std::pair<Function*, int> > &TorList) { std::vector<Constant*> ArrayElts; for (unsigned i = 0, e = TorList.size(); i != e; ++i) { std::vector<Constant*> Elts; - Elts.push_back(ConstantInt::get(Type::Int32Ty, TorList[i].second)); + Elts.push_back(ConstantInt::get( + Type::getInt32Ty(TorList[i].first->getContext()), TorList[i].second)); Elts.push_back(TorList[i].first); ArrayElts.push_back(ConstantStruct::get( TorList[i].first->getContext(), Elts)); |

