summaryrefslogtreecommitdiff
path: root/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
commiteebf60cae51371393c6136d71c7c715350079fb8 (patch)
tree4ceb711f8da04c8aca2ed2449537435c86abacc3 /lib/CompilerDriver/Main.cpp
parentd0f27c4ebbb445b1bb976a57dbd24df28318e464 (diff)
downloadllvm-eebf60cae51371393c6136d71c7c715350079fb8.tar.gz
llvm-eebf60cae51371393c6136d71c7c715350079fb8.tar.bz2
llvm-eebf60cae51371393c6136d71c7c715350079fb8.tar.xz
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74790 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CompilerDriver/Main.cpp')
-rw-r--r--lib/CompilerDriver/Main.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/CompilerDriver/Main.cpp b/lib/CompilerDriver/Main.cpp
index c9c0413028..7d1a3d8fbc 100644
--- a/lib/CompilerDriver/Main.cpp
+++ b/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;