[llvm] r214123 - llvm-uselistorder: Add -save-temps option
Duncan P. N. Exon Smith
dexonsmith at apple.com
Mon Jul 28 14:12:20 PDT 2014
Author: dexonsmith
Date: Mon Jul 28 16:12:19 2014
New Revision: 214123
URL: http://llvm.org/viewvc/llvm-project?rev=214123&view=rev
Log:
llvm-uselistorder: Add -save-temps option
This is part of PR5680.
Modified:
llvm/trunk/tools/llvm-uselistorder/llvm-uselistorder.cpp
Modified: llvm/trunk/tools/llvm-uselistorder/llvm-uselistorder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-uselistorder/llvm-uselistorder.cpp?rev=214123&r1=214122&r2=214123&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-uselistorder/llvm-uselistorder.cpp (original)
+++ llvm/trunk/tools/llvm-uselistorder/llvm-uselistorder.cpp Mon Jul 28 16:12:19 2014
@@ -40,6 +40,9 @@ static cl::opt<std::string> InputFilenam
cl::init("-"),
cl::value_desc("filename"));
+static cl::opt<bool> SaveTemps("save-temps", cl::desc("Save temp files"),
+ cl::init(false));
+
namespace {
struct TempFile {
@@ -89,7 +92,7 @@ bool TempFile::init(const std::string &E
assert(!Vector.empty());
Filename.assign(Vector.data(), Vector.data() + Vector.size());
- Remover.setFile(Filename);
+ Remover.setFile(Filename, !SaveTemps);
DEBUG(dbgs() << " - filename = " << Filename << "\n");
return false;
}
More information about the llvm-commits
mailing list