From 1d0be15f89cb5056e20e2d24faa8d6afb1573bca Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Thu, 13 Aug 2009 21:58:54 +0000 Subject: Push LLVMContexts through the IntegerType APIs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78948 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/bugpoint/ExtractFunction.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tools/bugpoint/ExtractFunction.cpp') diff --git a/tools/bugpoint/ExtractFunction.cpp b/tools/bugpoint/ExtractFunction.cpp index 684dde3538..9fdcc1bdea 100644 --- a/tools/bugpoint/ExtractFunction.cpp +++ b/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(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 > &TorList) { std::vector ArrayElts; for (unsigned i = 0, e = TorList.size(); i != e; ++i) { std::vector 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)); -- cgit v1.2.3-70-g09d2