[llvm-commits] [llvm] r73145 - /llvm/trunk/tools/lto/LTOCodeGenerator.cpp

Rafael Espindola rafael.espindola at gmail.com
Tue Jun 9 14:14:25 PDT 2009


Author: rafael
Date: Tue Jun  9 16:14:25 2009
New Revision: 73145

URL: http://llvm.org/viewvc/llvm-project?rev=73145&view=rev
Log:
Bug fix:

string::find returns string::npos if the substring is not found.

Modified:
    llvm/trunk/tools/lto/LTOCodeGenerator.cpp

Modified: llvm/trunk/tools/lto/LTOCodeGenerator.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lto/LTOCodeGenerator.cpp?rev=73145&r1=73144&r2=73145&view=diff

==============================================================================
--- llvm/trunk/tools/lto/LTOCodeGenerator.cpp (original)
+++ llvm/trunk/tools/lto/LTOCodeGenerator.cpp Tue Jun  9 16:14:25 2009
@@ -248,7 +248,7 @@
     std::vector<const char*> args;
     std::string targetTriple = _linker.getModule()->getTargetTriple();
     args.push_back(tool.c_str());
-    if ( targetTriple.find("darwin") != targetTriple.size() ) {
+    if ( targetTriple.find("darwin") != std::string::npos ) {
         // darwin specific command line options
         if (strncmp(targetTriple.c_str(), "i386-apple-", 11) == 0) {
             args.push_back("-arch");





More information about the llvm-commits mailing list