r193788 - Use StringRef::endswith_lower. No functionality change.
Rui Ueyama
ruiu at google.com
Thu Oct 31 12:12:53 PDT 2013
Author: ruiu
Date: Thu Oct 31 14:12:53 2013
New Revision: 193788
URL: http://llvm.org/viewvc/llvm-project?rev=193788&view=rev
Log:
Use StringRef::endswith_lower. No functionality change.
Modified:
cfe/trunk/lib/CodeGen/TargetInfo.cpp
Modified: cfe/trunk/lib/CodeGen/TargetInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/TargetInfo.cpp?rev=193788&r1=193787&r2=193788&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/TargetInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/TargetInfo.cpp Thu Oct 31 14:12:53 2013
@@ -1307,10 +1307,8 @@ static std::string qualifyWindowsLibrary
// If the argument does not end in .lib, automatically add the suffix. This
// matches the behavior of MSVC.
std::string ArgStr = Lib;
- if (Lib.size() <= 4 ||
- Lib.substr(Lib.size() - 4).compare_lower(".lib") != 0) {
+ if (!Lib.endswith_lower(".lib"))
ArgStr += ".lib";
- }
return ArgStr;
}
More information about the cfe-commits
mailing list