diff options
author | Stephen Hines <srhines@google.com> | 2014-04-23 16:57:46 -0700 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2014-04-24 15:53:16 -0700 |
commit | 36b56886974eae4f9c5ebc96befd3e7bfe5de338 (patch) | |
tree | e6cfb69fbbd937f450eeb83bfb83b9da3b01275a /tools/bugpoint/Miscompilation.cpp | |
parent | 69a8640022b04415ae9fac62f8ab090601d8f889 (diff) | |
download | external_llvm-36b56886974eae4f9c5ebc96befd3e7bfe5de338.zip external_llvm-36b56886974eae4f9c5ebc96befd3e7bfe5de338.tar.gz external_llvm-36b56886974eae4f9c5ebc96befd3e7bfe5de338.tar.bz2 |
Update to LLVM 3.5a.
Change-Id: Ifadecab779f128e62e430c2b4f6ddd84953ed617
Diffstat (limited to 'tools/bugpoint/Miscompilation.cpp')
-rw-r--r-- | tools/bugpoint/Miscompilation.cpp | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/tools/bugpoint/Miscompilation.cpp b/tools/bugpoint/Miscompilation.cpp index 771ec34..fecae60 100644 --- a/tools/bugpoint/Miscompilation.cpp +++ b/tools/bugpoint/Miscompilation.cpp @@ -15,13 +15,13 @@ #include "BugDriver.h" #include "ListReducer.h" #include "ToolRunner.h" -#include "llvm/Analysis/Verifier.h" #include "llvm/Config/config.h" // for HAVE_LINK_R #include "llvm/IR/Constants.h" #include "llvm/IR/DerivedTypes.h" #include "llvm/IR/Instructions.h" #include "llvm/IR/Module.h" -#include "llvm/Linker.h" +#include "llvm/IR/Verifier.h" +#include "llvm/Linker/Linker.h" #include "llvm/Pass.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/FileUtilities.h" @@ -48,9 +48,9 @@ namespace { public: ReduceMiscompilingPasses(BugDriver &bd) : BD(bd) {} - virtual TestResult doTest(std::vector<std::string> &Prefix, - std::vector<std::string> &Suffix, - std::string &Error); + TestResult doTest(std::vector<std::string> &Prefix, + std::vector<std::string> &Suffix, + std::string &Error) override; }; } @@ -128,8 +128,8 @@ ReduceMiscompilingPasses::doTest(std::vector<std::string> &Prefix, // Ok, so now we know that the prefix passes work, try running the suffix // passes on the result of the prefix passes. // - OwningPtr<Module> PrefixOutput(ParseInputFile(BitcodeResult, - BD.getContext())); + std::unique_ptr<Module> PrefixOutput( + ParseInputFile(BitcodeResult, BD.getContext())); if (!PrefixOutput) { errs() << BD.getToolName() << ": Error reading bitcode file '" << BitcodeResult << "'!\n"; @@ -145,7 +145,8 @@ ReduceMiscompilingPasses::doTest(std::vector<std::string> &Prefix, << "' passes compile correctly after the '" << getPassesString(Prefix) << "' passes: "; - OwningPtr<Module> OriginalInput(BD.swapProgramIn(PrefixOutput.take())); + std::unique_ptr<Module> OriginalInput( + BD.swapProgramIn(PrefixOutput.release())); if (BD.runPasses(BD.getProgram(), Suffix, BitcodeResult, false/*delete*/, true/*quiet*/)) { errs() << " Error running this sequence of passes" @@ -168,7 +169,7 @@ ReduceMiscompilingPasses::doTest(std::vector<std::string> &Prefix, // Otherwise, we must not be running the bad pass anymore. outs() << " yup.\n"; // No miscompilation! // Restore orig program & free test. - delete BD.swapProgramIn(OriginalInput.take()); + delete BD.swapProgramIn(OriginalInput.release()); return NoFailure; } @@ -182,9 +183,9 @@ namespace { std::string &)) : BD(bd), TestFn(F) {} - virtual TestResult doTest(std::vector<Function*> &Prefix, - std::vector<Function*> &Suffix, - std::string &Error) { + TestResult doTest(std::vector<Function*> &Prefix, + std::vector<Function*> &Suffix, + std::string &Error) override { if (!Suffix.empty()) { bool Ret = TestFuncs(Suffix, Error); if (!Error.empty()) @@ -467,9 +468,9 @@ namespace { const std::vector<Function*> &Fns) : BD(bd), TestFn(F), FunctionsBeingTested(Fns) {} - virtual TestResult doTest(std::vector<BasicBlock*> &Prefix, - std::vector<BasicBlock*> &Suffix, - std::string &Error) { + TestResult doTest(std::vector<BasicBlock*> &Prefix, + std::vector<BasicBlock*> &Suffix, + std::string &Error) override { if (!Suffix.empty()) { bool Ret = TestFuncs(Suffix, Error); if (!Error.empty()) |