[llvm-commits] [llvm] r74790 - in /llvm/trunk/lib/CompilerDriver: Main.cpp Tool.cpp
Mikhail Glushenkov
foldr at codedgers.com
Sat Jul 4 07:23:33 PDT 2009
Author: foldr
Date: Sat Jul 4 09:23:32 2009
New Revision: 74790
URL: http://llvm.org/viewvc/llvm-project?rev=74790&view=rev
Log:
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.
Modified:
llvm/trunk/lib/CompilerDriver/Main.cpp
llvm/trunk/lib/CompilerDriver/Tool.cpp
Modified: llvm/trunk/lib/CompilerDriver/Main.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CompilerDriver/Main.cpp?rev=74790&r1=74789&r2=74790&view=diff
==============================================================================
--- llvm/trunk/lib/CompilerDriver/Main.cpp (original)
+++ llvm/trunk/lib/CompilerDriver/Main.cpp Sat Jul 4 09:23:32 2009
@@ -37,6 +37,7 @@
}
else if (SaveTemps == SaveTempsEnum::Obj && !OutputFilename.empty()) {
tempDir = OutputFilename;
+ tempDir = tempDir.getDirname();
if (!tempDir.exists()) {
std::string ErrMsg;
Modified: llvm/trunk/lib/CompilerDriver/Tool.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CompilerDriver/Tool.cpp?rev=74790&r1=74789&r2=74790&view=diff
==============================================================================
--- llvm/trunk/lib/CompilerDriver/Tool.cpp (original)
+++ llvm/trunk/lib/CompilerDriver/Tool.cpp Sat Jul 4 09:23:32 2009
@@ -56,7 +56,7 @@
sys::Path Out;
if (StopCompilation) {
- if (!OutputFilename.empty() && SaveTemps != SaveTempsEnum::Obj ) {
+ if (!OutputFilename.empty()) {
Out.set(OutputFilename);
}
else if (IsJoin()) {
More information about the llvm-commits
mailing list