From: Rafael Espindola Date: Tue, 9 Jun 2009 21:14:25 +0000 (+0000) Subject: Bug fix: X-Git-Tag: android-x86-6.0-r1~1003^2~20106 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=f403cd7838aefaacef11bbc1398f165b76ba131f;p=android-x86%2Fexternal-llvm.git Bug fix: string::find returns string::npos if the substring is not found. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73145 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/lto/LTOCodeGenerator.cpp b/tools/lto/LTOCodeGenerator.cpp index 0bd2abe2455..6f8a02867c3 100644 --- a/tools/lto/LTOCodeGenerator.cpp +++ b/tools/lto/LTOCodeGenerator.cpp @@ -248,7 +248,7 @@ bool LTOCodeGenerator::assemble(const std::string& asmPath, std::vector 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");