[llvm-commits] [llvm] r82071 - /llvm/trunk/tools/llc/llc.cpp
Dan Gohman
gohman at apple.com
Wed Sep 16 12:18:42 PDT 2009
Author: djg
Date: Wed Sep 16 14:18:41 2009
New Revision: 82071
URL: http://llvm.org/viewvc/llvm-project?rev=82071&view=rev
Log:
Now that llc can read .ll files directly, teach it to recognize .ll as
an extension, so that the default output filename for foo.ll is foo.s,
not foo.ll.s
Modified:
llvm/trunk/tools/llc/llc.cpp
Modified: llvm/trunk/tools/llc/llc.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llc/llc.cpp?rev=82071&r1=82070&r2=82071&view=diff
==============================================================================
--- llvm/trunk/tools/llc/llc.cpp (original)
+++ llvm/trunk/tools/llc/llc.cpp Wed Sep 16 14:18:41 2009
@@ -119,7 +119,9 @@
std::string outputFilename;
int Len = IFN.length();
if ((Len > 2) &&
- IFN[Len-3] == '.' && IFN[Len-2] == 'b' && IFN[Len-1] == 'c') {
+ IFN[Len-3] == '.' &&
+ ((IFN[Len-2] == 'b' && IFN[Len-1] == 'c') ||
+ (IFN[Len-2] == 'l' && IFN[Len-1] == 'l'))) {
outputFilename = std::string(IFN.begin(), IFN.end()-3); // s/.bc/.s/
} else {
outputFilename = IFN;
More information about the llvm-commits
mailing list