aboutsummaryrefslogtreecommitdiffstats
path: root/tools/llc
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-09-16 19:18:41 +0000
committerDan Gohman <gohman@apple.com>2009-09-16 19:18:41 +0000
commitd81c450afcc0258586d677813c388b0c8f289887 (patch)
treedc398a42f4f296c66db614ada29551a5226ee501 /tools/llc
parent1b75f44bd9b1cf4a532940ff986c9ee8bd21564f (diff)
downloadexternal_llvm-d81c450afcc0258586d677813c388b0c8f289887.zip
external_llvm-d81c450afcc0258586d677813c388b0c8f289887.tar.gz
external_llvm-d81c450afcc0258586d677813c388b0c8f289887.tar.bz2
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82071 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llc')
-rw-r--r--tools/llc/llc.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/llc/llc.cpp b/tools/llc/llc.cpp
index f6fccbe..b94e5fb 100644
--- a/tools/llc/llc.cpp
+++ b/tools/llc/llc.cpp
@@ -119,7 +119,9 @@ GetFileNameRoot(const std::string &InputFilename) {
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;