mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-21 21:11:36 +00:00
Simplify ".bc" detection.
llvm-svn: 101365
This commit is contained in:
parent
428ca23bbd
commit
c57e4c744b
@ -192,8 +192,7 @@ int main(int argc, char **argv, char * const *envp) {
|
|||||||
} else {
|
} else {
|
||||||
// Otherwise, if there is a .bc suffix on the executable strip it off, it
|
// Otherwise, if there is a .bc suffix on the executable strip it off, it
|
||||||
// might confuse the program.
|
// might confuse the program.
|
||||||
if (InputFile.size() > 3 &&
|
if (StringRef(InputFile).endswith(".bc"))
|
||||||
InputFile.rfind(".bc") == InputFile.length() - 3)
|
|
||||||
InputFile.erase(InputFile.length() - 3);
|
InputFile.erase(InputFile.length() - 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user