forked from OSchip/llvm-project
llvm-uselistorder: Add -save-temps option
This is part of PR5680. llvm-svn: 214123
This commit is contained in:
parent
75d94849b4
commit
2101a7fbcf
|
@ -40,6 +40,9 @@ static cl::opt<std::string> InputFilename(cl::Positional,
|
|||
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 &Ext) {
|
|||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue