From 0aed6e729d9d200e26391594cc7e3b07cff8836f Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Mon, 28 Jul 2014 21:12:19 +0000 Subject: [PATCH] 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 --- tools/llvm-uselistorder/llvm-uselistorder.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; } -- 2.34.1