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 | e8d0150398fee132b3f9c36352f3b5ef85c019c8 (patch) | |
| tree | 521f01f6411407f2e48636bcfafddc19046f6034 /llvm/tools | |
| parent | c15c25200733a2c201534b873e15011aa1e049f8 (diff) | |
| download | bcm5719-llvm-e8d0150398fee132b3f9c36352f3b5ef85c019c8.tar.gz bcm5719-llvm-e8d0150398fee132b3f9c36352f3b5ef85c019c8.zip | |
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
llvm-svn: 82071
Diffstat (limited to 'llvm/tools')
| -rw-r--r-- | llvm/tools/llc/llc.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/tools/llc/llc.cpp b/llvm/tools/llc/llc.cpp index f6fccbe8aab..b94e5fb97c7 100644 --- a/llvm/tools/llc/llc.cpp +++ b/llvm/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; |

