From 4f0fa1539ce32c9a38854d0d6952b03348841328 Mon Sep 17 00:00:00 2001 From: Mikhail Glushenkov Date: Sat, 4 Jul 2009 14:23:32 +0000 Subject: 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 --- llvm/lib/CompilerDriver/Main.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'llvm/lib/CompilerDriver/Main.cpp') 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; -- cgit v1.2.3