From 4056ca9568acd3a43a4d7ce96c4a7dec2442e071 Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Wed, 29 Jul 2009 22:17:13 +0000 Subject: Move types back to the 2.5 API. llvm-svn: 77516 --- llvm/tools/bugpoint/ExtractFunction.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'llvm/tools/bugpoint/ExtractFunction.cpp') diff --git a/llvm/tools/bugpoint/ExtractFunction.cpp b/llvm/tools/bugpoint/ExtractFunction.cpp index c2159dea4b0..ea40caaf3d9 100644 --- a/llvm/tools/bugpoint/ExtractFunction.cpp +++ b/llvm/tools/bugpoint/ExtractFunction.cpp @@ -181,7 +181,6 @@ void llvm::DeleteFunctionBody(Function *F) { /// as a constant array. static Constant *GetTorInit(std::vector > &TorList) { assert(!TorList.empty() && "Don't create empty tor list!"); - LLVMContext &Context = TorList[0].first->getContext(); std::vector ArrayElts; for (unsigned i = 0, e = TorList.size(); i != e; ++i) { std::vector Elts; @@ -189,7 +188,7 @@ static Constant *GetTorInit(std::vector > &TorList) { Elts.push_back(TorList[i].first); ArrayElts.push_back(ConstantStruct::get(Elts)); } - return ConstantArray::get(Context.getArrayType(ArrayElts[0]->getType(), + return ConstantArray::get(ArrayType::get(ArrayElts[0]->getType(), ArrayElts.size()), ArrayElts); } -- cgit v1.2.3