summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CompilerDriver/Main.cpp
diff options
context:
space:
mode:
authorMikhail Glushenkov <foldr@codedgers.com>2009-07-04 14:23:32 +0000
committerMikhail Glushenkov <foldr@codedgers.com>2009-07-04 14:23:32 +0000
commit4f0fa1539ce32c9a38854d0d6952b03348841328 (patch)
tree92c13099746926158c4dca9f5d9b54c9630a13e0 /llvm/lib/CompilerDriver/Main.cpp
parent9297a52715f96beef84ee5e6c89bb2dc58d03d3c (diff)
downloadbcm5719-llvm-4f0fa1539ce32c9a38854d0d6952b03348841328.tar.gz
bcm5719-llvm-4f0fa1539ce32c9a38854d0d6952b03348841328.zip
Make -save-temps=obj play better with -o.
Use only the *dirname* of the pathname given to -o, so that -o can still be used to name the output executable. This is more like what GCC 4.5 does. llvm-svn: 74790
Diffstat (limited to 'llvm/lib/CompilerDriver/Main.cpp')
-rw-r--r--llvm/lib/CompilerDriver/Main.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/CompilerDriver/Main.cpp b/llvm/lib/CompilerDriver/Main.cpp
index c9c0413028d..7d1a3d8fbc4 100644
--- a/llvm/lib/CompilerDriver/Main.cpp
+++ b/llvm/lib/CompilerDriver/Main.cpp
@@ -37,6 +37,7 @@ namespace {
}
else if (SaveTemps == SaveTempsEnum::Obj && !OutputFilename.empty()) {
tempDir = OutputFilename;
+ tempDir = tempDir.getDirname();
if (!tempDir.exists()) {
std::string ErrMsg;
OpenPOWER on IntegriCloud