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
This commit is contained in:
Rafael Espindola 2009-06-09 21:14:25 +00:00
parent 3ae67f5910
commit f403cd7838

View File

@ -248,7 +248,7 @@ bool LTOCodeGenerator::assemble(const std::string& asmPath,
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");