diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2009-06-09 21:14:25 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2009-06-09 21:14:25 +0000 |
commit | f403cd7838aefaacef11bbc1398f165b76ba131f (patch) | |
tree | d6a33c23de1ee031b5325238770eb3e1833679ea /tools/lto | |
parent | 3ae67f59104d9837a7012d73574a8c7cfa176b12 (diff) | |
download | external_llvm-f403cd7838aefaacef11bbc1398f165b76ba131f.zip external_llvm-f403cd7838aefaacef11bbc1398f165b76ba131f.tar.gz external_llvm-f403cd7838aefaacef11bbc1398f165b76ba131f.tar.bz2 |
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
Diffstat (limited to 'tools/lto')
-rw-r--r-- | tools/lto/LTOCodeGenerator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/lto/LTOCodeGenerator.cpp b/tools/lto/LTOCodeGenerator.cpp index 0bd2abe..6f8a028 100644 --- a/tools/lto/LTOCodeGenerator.cpp +++ b/tools/lto/LTOCodeGenerator.cpp @@ -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"); |