From 727025a5e16f228af4193f106906a5ea4f77e80d Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Thu, 31 Oct 2013 19:12:53 +0000 Subject: [PATCH] Use StringRef::endswith_lower. No functionality change. llvm-svn: 193788 --- clang/lib/CodeGen/TargetInfo.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp index 0d5c47686f03..7d7f7b7dda86 100644 --- a/clang/lib/CodeGen/TargetInfo.cpp +++ b/clang/lib/CodeGen/TargetInfo.cpp @@ -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; }