diff options
author | Chris Lattner <sabre@nondot.org> | 2011-07-18 04:54:35 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-07-18 04:54:35 +0000 |
commit | db125cfaf57cc83e7dd7453de2d509bc8efd0e5e (patch) | |
tree | a163ac0f83da7be3f9675a122a6144b12418be09 /tools | |
parent | 4b3d5469fb7c25504fa20dc65640f02d79675d48 (diff) | |
download | llvm-db125cfaf57cc83e7dd7453de2d509bc8efd0e5e.tar.gz llvm-db125cfaf57cc83e7dd7453de2d509bc8efd0e5e.tar.bz2 llvm-db125cfaf57cc83e7dd7453de2d509bc8efd0e5e.tar.xz |
land David Blaikie's patch to de-constify Type, with a few tweaks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135375 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/bugpoint/ExtractFunction.cpp | 2 | ||||
-rw-r--r-- | tools/bugpoint/Miscompilation.cpp | 6 | ||||
-rw-r--r-- | tools/lto/LTOCodeGenerator.cpp | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/tools/bugpoint/ExtractFunction.cpp b/tools/bugpoint/ExtractFunction.cpp index 9941add52e..73b65ca94f 100644 --- a/tools/bugpoint/ExtractFunction.cpp +++ b/tools/bugpoint/ExtractFunction.cpp @@ -175,7 +175,7 @@ static Constant *GetTorInit(std::vector<std::pair<Function*, int> > &TorList) { std::vector<Constant*> ArrayElts; Type *Int32Ty = Type::getInt32Ty(TorList[0].first->getContext()); - const StructType *STy = + StructType *STy = StructType::get(Int32Ty, TorList[0].first->getType(), NULL); for (unsigned i = 0, e = TorList.size(); i != e; ++i) { Constant *Elts[] = { diff --git a/tools/bugpoint/Miscompilation.cpp b/tools/bugpoint/Miscompilation.cpp index d645dfb898..4da444bca6 100644 --- a/tools/bugpoint/Miscompilation.cpp +++ b/tools/bugpoint/Miscompilation.cpp @@ -384,7 +384,7 @@ static bool ExtractLoops(BugDriver &BD, outs() << "*** Loop extraction successful!\n"; - std::vector<std::pair<std::string, const FunctionType*> > MisCompFunctions; + std::vector<std::pair<std::string, FunctionType*> > MisCompFunctions; for (Module::iterator I = ToOptimizeLoopExtracted->begin(), E = ToOptimizeLoopExtracted->end(); I != E; ++I) if (!I->isDeclaration()) @@ -569,7 +569,7 @@ static bool ExtractBlocks(BugDriver &BD, // together. delete ToExtract; - std::vector<std::pair<std::string, const FunctionType*> > MisCompFunctions; + std::vector<std::pair<std::string, FunctionType*> > MisCompFunctions; for (Module::iterator I = Extracted->begin(), E = Extracted->end(); I != E; ++I) if (!I->isDeclaration()) @@ -850,7 +850,7 @@ static void CleanupAndPrepareModules(BugDriver &BD, Module *&Test, NullPtr,F->getName()+".fpcache"); // Construct a new stub function that will re-route calls to F - const FunctionType *FuncTy = F->getFunctionType(); + FunctionType *FuncTy = F->getFunctionType(); Function *FuncWrapper = Function::Create(FuncTy, GlobalValue::InternalLinkage, F->getName() + "_wrapper", diff --git a/tools/lto/LTOCodeGenerator.cpp b/tools/lto/LTOCodeGenerator.cpp index 14594cf553..68cd2bb939 100644 --- a/tools/lto/LTOCodeGenerator.cpp +++ b/tools/lto/LTOCodeGenerator.cpp @@ -329,7 +329,7 @@ void LTOCodeGenerator::applyScopeRestrictions() { if (LLVMCompilerUsed) LLVMCompilerUsed->eraseFromParent(); - const llvm::Type *i8PTy = llvm::Type::getInt8PtrTy(_context); + llvm::Type *i8PTy = llvm::Type::getInt8PtrTy(_context); std::vector<Constant*> asmUsed2; for (SmallPtrSet<GlobalValue*, 16>::const_iterator i = asmUsed.begin(), e = asmUsed.end(); i !=e; ++i) { |