]> granicus.if.org Git - clang/commitdiff
Use StringRef::endswith_lower. No functionality change.
authorRui Ueyama <ruiu@google.com>
Thu, 31 Oct 2013 19:12:53 +0000 (19:12 +0000)
committerRui Ueyama <ruiu@google.com>
Thu, 31 Oct 2013 19:12:53 +0000 (19:12 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193788 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/TargetInfo.cpp

index 0d5c47686f0341f21be6ad0b51de9e9aa8ce9ae9..7d7f7b7dda86e6742044c0b644ebcf81cca3192d 100644 (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;
 }