[llvm-commits] [llvm] r101365 - /llvm/trunk/tools/lli/lli.cpp

Benjamin Kramer benny.kra at googlemail.com
Thu Apr 15 04:33:14 PDT 2010


Author: d0k
Date: Thu Apr 15 06:33:14 2010
New Revision: 101365

URL: http://llvm.org/viewvc/llvm-project?rev=101365&view=rev
Log:
Simplify ".bc" detection.

Modified:
    llvm/trunk/tools/lli/lli.cpp

Modified: llvm/trunk/tools/lli/lli.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lli/lli.cpp?rev=101365&r1=101364&r2=101365&view=diff
==============================================================================
--- llvm/trunk/tools/lli/lli.cpp (original)
+++ llvm/trunk/tools/lli/lli.cpp Thu Apr 15 06:33:14 2010
@@ -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);
   }
 





More information about the llvm-commits mailing list