summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2013-10-31 19:12:53 +0000
committerRui Ueyama <ruiu@google.com>2013-10-31 19:12:53 +0000
commit727025a5e16f228af4193f106906a5ea4f77e80d (patch)
tree68e70e2240cfcfc503fae5d13315956e5bb53674
parent775f29573ae983953fc6c7bc8d21eae03cb30a52 (diff)
downloadbcm5719-llvm-727025a5e16f228af4193f106906a5ea4f77e80d.tar.gz
bcm5719-llvm-727025a5e16f228af4193f106906a5ea4f77e80d.zip
Use StringRef::endswith_lower. No functionality change.
llvm-svn: 193788
-rw-r--r--clang/lib/CodeGen/TargetInfo.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp
index 0d5c47686f0..7d7f7b7dda8 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;
}
OpenPOWER on IntegriCloud