diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2010-04-15 11:33:14 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2010-04-15 11:33:14 +0000 |
commit | a944a9a902af0a45823c3a2c693880cedef90a3f (patch) | |
tree | 99f24fb426f2f23c815871afd41e3d0a25e155f9 | |
parent | aafd20963209e1f19235de9de1afed3584a830c3 (diff) | |
download | bcm5719-llvm-a944a9a902af0a45823c3a2c693880cedef90a3f.tar.gz bcm5719-llvm-a944a9a902af0a45823c3a2c693880cedef90a3f.zip |
Simplify ".bc" detection.
llvm-svn: 101365
-rw-r--r-- | llvm/tools/lli/lli.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/tools/lli/lli.cpp b/llvm/tools/lli/lli.cpp index affe6bb6531..4e3e07ffd22 100644 --- a/llvm/tools/lli/lli.cpp +++ b/llvm/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); } |