From: Duncan P. N. Exon Smith Date: Mon, 28 Jul 2014 21:12:19 +0000 (+0000) Subject: llvm-uselistorder: Add -save-temps option X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0aed6e729d9d200e26391594cc7e3b07cff8836f;p=oota-llvm.git llvm-uselistorder: Add -save-temps option This is part of PR5680. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214123 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/llvm-uselistorder/llvm-uselistorder.cpp b/tools/llvm-uselistorder/llvm-uselistorder.cpp index 2d9bb12e55b..d86b592c928 100644 --- a/tools/llvm-uselistorder/llvm-uselistorder.cpp +++ b/tools/llvm-uselistorder/llvm-uselistorder.cpp @@ -40,6 +40,9 @@ static cl::opt InputFilename(cl::Positional, cl::init("-"), cl::value_desc("filename")); +static cl::opt 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; }