aboutsummaryrefslogtreecommitdiffstats
path: root/tools/bugpoint/ToolRunner.cpp
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2009-08-05 09:32:10 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2009-08-05 09:32:10 +0000
commit86c006a971eb6fab6bd4923ff7ec1c0bc9c28f74 (patch)
treef25de9e525ab1dc0333f3f3d13e774fb797bd5fe /tools/bugpoint/ToolRunner.cpp
parent0802a1e1e8e1b9746996f2b1441a63378b83c354 (diff)
downloadexternal_llvm-86c006a971eb6fab6bd4923ff7ec1c0bc9c28f74.zip
external_llvm-86c006a971eb6fab6bd4923ff7ec1c0bc9c28f74.tar.gz
external_llvm-86c006a971eb6fab6bd4923ff7ec1c0bc9c28f74.tar.bz2
Add save-temps option to bugpoint to keep temporary stuff.
Patch by Sandeep Patel git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78183 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/bugpoint/ToolRunner.cpp')
-rw-r--r--tools/bugpoint/ToolRunner.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/tools/bugpoint/ToolRunner.cpp b/tools/bugpoint/ToolRunner.cpp
index ef07079..81314a8 100644
--- a/tools/bugpoint/ToolRunner.cpp
+++ b/tools/bugpoint/ToolRunner.cpp
@@ -22,6 +22,11 @@
#include <sstream>
using namespace llvm;
+namespace llvm {
+ cl::opt<bool>
+ SaveTemps("save-temps", cl::init(false), cl::desc("Save temporary files"));
+}
+
namespace {
cl::opt<std::string>
RemoteClient("remote-client",
@@ -395,7 +400,7 @@ int LLC::ExecuteProgram(const std::string &Bitcode,
sys::Path OutputAsmFile;
OutputCode(Bitcode, OutputAsmFile);
- FileRemover OutFileRemover(OutputAsmFile);
+ FileRemover OutFileRemover(OutputAsmFile, !SaveTemps);
std::vector<std::string> GCCArgs(ArgsForGCC);
GCCArgs.insert(GCCArgs.end(), SharedLibs.begin(), SharedLibs.end());
@@ -560,7 +565,7 @@ int CBE::ExecuteProgram(const std::string &Bitcode,
sys::Path OutputCFile;
OutputCode(Bitcode, OutputCFile);
- FileRemover CFileRemove(OutputCFile);
+ FileRemover CFileRemove(OutputCFile, !SaveTemps);
std::vector<std::string> GCCArgs(ArgsForGCC);
GCCArgs.insert(GCCArgs.end(), SharedLibs.begin(), SharedLibs.end());
@@ -726,7 +731,7 @@ int GCC::ExecuteProgram(const std::string &ProgramFile,
errs() << "\n";
);
- FileRemover OutputBinaryRemover(OutputBinary);
+ FileRemover OutputBinaryRemover(OutputBinary, !SaveTemps);
if (RemoteClientPath.isEmpty()) {
DEBUG(errs() << "<run locally>";);