From 74382b7c699120fbec5cb5603c9cf4212eb37f06 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 23 Aug 2009 22:45:37 +0000 Subject: 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 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 --- tools/bugpoint/ExecutionDriver.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'tools/bugpoint/ExecutionDriver.cpp') 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 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 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'; -- cgit v1.2.3