projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
165dac0
)
Simplify ".bc" detection.
author
Benjamin Kramer
<benny.kra@googlemail.com>
Thu, 15 Apr 2010 11:33:14 +0000
(11:33 +0000)
committer
Benjamin Kramer
<benny.kra@googlemail.com>
Thu, 15 Apr 2010 11:33:14 +0000
(11:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101365
91177308
-0d34-0410-b5e6-
96231b3b80d8
tools/lli/lli.cpp
patch
|
blob
|
history
diff --git
a/tools/lli/lli.cpp
b/tools/lli/lli.cpp
index affe6bb65314df01157e98fff4ee6b91e355e402..4e3e07ffd22c8bb6352ba6b4da413f3a5e802445 100644
(file)
--- 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);
}