summaryrefslogtreecommitdiffstats
path: root/lib/CompilerDriver/Tool.cpp
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2009-06-27 10:44:33 +0000
committered <ed@FreeBSD.org>2009-06-27 10:44:33 +0000
commitcf5cd875b51255602afaed29deb636b66b295671 (patch)
tree9794dc36f22f2a2b3f8063829d8a9b3a7794acc8 /lib/CompilerDriver/Tool.cpp
parent5c1b5c146f3df07c75174aff06c3bb0968f6857e (diff)
downloadFreeBSD-src-cf5cd875b51255602afaed29deb636b66b295671.zip
FreeBSD-src-cf5cd875b51255602afaed29deb636b66b295671.tar.gz
Import LLVM r74383.
Diffstat (limited to 'lib/CompilerDriver/Tool.cpp')
-rw-r--r--lib/CompilerDriver/Tool.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/CompilerDriver/Tool.cpp b/lib/CompilerDriver/Tool.cpp
index 886b26b..e704dd9 100644
--- a/lib/CompilerDriver/Tool.cpp
+++ b/lib/CompilerDriver/Tool.cpp
@@ -11,16 +11,14 @@
//
//===----------------------------------------------------------------------===//
+#include "llvm/CompilerDriver/BuiltinOptions.h"
#include "llvm/CompilerDriver/Tool.h"
#include "llvm/System/Path.h"
-#include "llvm/Support/CommandLine.h"
using namespace llvm;
using namespace llvmc;
-extern cl::opt<std::string> OutputFilename;
-
namespace {
sys::Path MakeTempFile(const sys::Path& TempDir, const std::string& BaseName,
const std::string& Suffix) {
@@ -39,7 +37,7 @@ namespace {
// NOTE: makeUnique always *creates* a unique temporary file,
// which is good, since there will be no races. However, some
// tools do not like it when the output file already exists, so
- // they have to be placated with -f or something like that.
+ // they need to be placated with -f or something like that.
Out.makeUnique(true, NULL);
return Out;
}
@@ -52,7 +50,7 @@ sys::Path Tool::OutFilename(const sys::Path& In,
sys::Path Out;
if (StopCompilation) {
- if (!OutputFilename.empty()) {
+ if (!OutputFilename.empty() && SaveTemps != SaveTempsEnum::Obj ) {
Out.set(OutputFilename);
}
else if (IsJoin()) {
OpenPOWER on IntegriCloud