Use StringRef::endswith_lower. No functionality change.
llvm-svn: 193788
diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp
index 0d5c476..7d7f7b7 100644
--- a/clang/lib/CodeGen/TargetInfo.cpp
+++ b/clang/lib/CodeGen/TargetInfo.cpp
@@ -1307,10 +1307,8 @@
// 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;
}