Use StringRef::endswith_lower. No functionality change.

llvm-svn: 193788
This commit is contained in:
Rui Ueyama 2013-10-31 19:12:53 +00:00
parent 775f29573a
commit 727025a5e1
1 changed files with 1 additions and 3 deletions

View File

@ -1307,10 +1307,8 @@ static std::string qualifyWindowsLibrary(llvm::StringRef Lib) {
// 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;
}