aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lli
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2010-04-15 11:33:14 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2010-04-15 11:33:14 +0000
commit2e6fc5c303a0d75704ed18c84cba0e93e31f3189 (patch)
treed5234eaaf75679b5d8554787b280bb98f8afe0ff /tools/lli
parentd46fdb45387f46beeadc04472b3a66ad1da3aca1 (diff)
downloadexternal_llvm-2e6fc5c303a0d75704ed18c84cba0e93e31f3189.zip
external_llvm-2e6fc5c303a0d75704ed18c84cba0e93e31f3189.tar.gz
external_llvm-2e6fc5c303a0d75704ed18c84cba0e93e31f3189.tar.bz2
Simplify ".bc" detection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101365 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/lli')
-rw-r--r--tools/lli/lli.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/lli/lli.cpp b/tools/lli/lli.cpp
index affe6bb..4e3e07f 100644
--- a/tools/lli/lli.cpp
+++ b/tools/lli/lli.cpp
@@ -192,8 +192,7 @@ int main(int argc, char **argv, char * const *envp) {
} else {
// Otherwise, if there is a .bc suffix on the executable strip it off, it
// might confuse the program.
- if (InputFile.size() > 3 &&
- InputFile.rfind(".bc") == InputFile.length() - 3)
+ if (StringRef(InputFile).endswith(".bc"))
InputFile.erase(InputFile.length() - 3);
}