diff options
author | Chris Lattner <sabre@nondot.org> | 2009-08-23 22:45:37 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-08-23 22:45:37 +0000 |
commit | 74382b7c699120fbec5cb5603c9cf4212eb37f06 (patch) | |
tree | c8c2c5b8879b256c428b0d35841b9cce1c2cc51c /tools/bugpoint/ExecutionDriver.cpp | |
parent | 983c592272eb59d39fd78c515e1f2701638879e0 (diff) | |
download | llvm-74382b7c699120fbec5cb5603c9cf4212eb37f06.tar.gz llvm-74382b7c699120fbec5cb5603c9cf4212eb37f06.tar.bz2 llvm-74382b7c699120fbec5cb5603c9cf4212eb37f06.tar.xz |
Prune #includes from llvm/Linker.h and llvm/System/Path.h,
forcing them down into various .cpp files.
This change also:
1. Renames TimeValue::toString() and Path::toString() to ::str()
for similarity with the STL.
2. Removes all stream insertion support for sys::Path, forcing
clients to call .str().
3. Removes a use of Config/alloca.h from bugpoint, using smallvector
instead.
4. Weans llvm-db off <iostream>
sys::Path really needs to be gutted, but I don't have the desire to
do it at this point.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79869 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/bugpoint/ExecutionDriver.cpp')
-rw-r--r-- | tools/bugpoint/ExecutionDriver.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/tools/bugpoint/ExecutionDriver.cpp b/tools/bugpoint/ExecutionDriver.cpp index 3916957a62..72b9717641 100644 --- a/tools/bugpoint/ExecutionDriver.cpp +++ b/tools/bugpoint/ExecutionDriver.cpp @@ -18,6 +18,7 @@ #include "llvm/Support/Debug.h" #include "llvm/Support/FileUtilities.h" #include "llvm/Support/SystemUtils.h" +#include "llvm/Support/raw_ostream.h" #include <fstream> using namespace llvm; @@ -280,9 +281,9 @@ void BugDriver::compileProgram(Module *M) { << "\n"; exit(1); } - if (writeProgramToFile(BitcodeFile.toString(), M)) { + if (writeProgramToFile(BitcodeFile.str(), M)) { errs() << ToolName << ": Error emitting bitcode to file '" - << BitcodeFile << "'!\n"; + << BitcodeFile.str() << "'!\n"; exit(1); } @@ -290,7 +291,7 @@ void BugDriver::compileProgram(Module *M) { FileRemover BitcodeFileRemover(BitcodeFile, !SaveTemps); // Actually compile the program! - Interpreter->compileProgram(BitcodeFile.toString()); + Interpreter->compileProgram(BitcodeFile.str()); } @@ -315,7 +316,7 @@ std::string BugDriver::executeProgram(std::string OutputFile, << ErrMsg << "!\n"; exit(1); } - BitcodeFile = uniqueFilename.toString(); + BitcodeFile = uniqueFilename.str(); if (writeProgramToFile(BitcodeFile, Program)) { errs() << ToolName << ": Error emitting bitcode to file '" @@ -338,7 +339,7 @@ std::string BugDriver::executeProgram(std::string OutputFile, << ErrMsg << "\n"; exit(1); } - OutputFile = uniqueFile.toString(); + OutputFile = uniqueFile.str(); // Figure out which shared objects to run, if any. std::vector<std::string> SharedObjs(AdditionalSOs); @@ -393,7 +394,7 @@ std::string BugDriver::compileSharedObject(const std::string &BitcodeFile) { GCC::FileType FT = SafeInterpreter->OutputCode(BitcodeFile, OutputFile); std::string SharedObjectFile; - if (gcc->MakeSharedObject(OutputFile.toString(), FT, + if (gcc->MakeSharedObject(OutputFile.str(), FT, SharedObjectFile, AdditionalLinkerArgs)) exit(1); @@ -447,7 +448,7 @@ bool BugDriver::diffProgram(const std::string &BitcodeFile, std::string Error; bool FilesDifferent = false; if (int Diff = DiffFilesWithTolerance(sys::Path(ReferenceOutputFile), - sys::Path(Output.toString()), + sys::Path(Output.str()), AbsTolerance, RelTolerance, &Error)) { if (Diff == 2) { errs() << "While diffing output: " << Error << '\n'; |