diff options
author | Dan Gohman <gohman@apple.com> | 2009-09-16 19:18:41 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-09-16 19:18:41 +0000 |
commit | 1a2d32471a3fdc8f274411142bc8bc22294fa470 (patch) | |
tree | dc398a42f4f296c66db614ada29551a5226ee501 /tools | |
parent | 5223bf761d1d6ee0641bf2644e25265e84801926 (diff) | |
download | external_llvm-1a2d32471a3fdc8f274411142bc8bc22294fa470.zip external_llvm-1a2d32471a3fdc8f274411142bc8bc22294fa470.tar.gz external_llvm-1a2d32471a3fdc8f274411142bc8bc22294fa470.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')
-rw-r--r-- | tools/llc/llc.cpp | 4 |
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; |