Simplify ".bc" detection.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101365 91177308-0d34-0410-b5e6-96231b3b80d8
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 @@
   } 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);
   }