summaryrefslogtreecommitdiffstats
path: root/lld/lib/Core/Reproduce.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2017-07-19 21:40:26 +0000
committerRui Ueyama <ruiu@google.com>2017-07-19 21:40:26 +0000
commit12234f8093b39bbd9ca9235be98d44a7cc7d59f2 (patch)
treeb6783fce247a4007806b62fe68f4830e3c8f3e77 /lld/lib/Core/Reproduce.cpp
parent1985e9b7e1f430da20efa7d8f48ac0ad6583322b (diff)
downloadbcm5719-llvm-12234f8093b39bbd9ca9235be98d44a7cc7d59f2.tar.gz
bcm5719-llvm-12234f8093b39bbd9ca9235be98d44a7cc7d59f2.zip
Use StringRef::contains().
llvm-svn: 308526
Diffstat (limited to 'lld/lib/Core/Reproduce.cpp')
-rw-r--r--lld/lib/Core/Reproduce.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lld/lib/Core/Reproduce.cpp b/lld/lib/Core/Reproduce.cpp
index e3629a93cbe..6295e628bcd 100644
--- a/lld/lib/Core/Reproduce.cpp
+++ b/lld/lib/Core/Reproduce.cpp
@@ -44,9 +44,9 @@ std::string lld::relativeToRoot(StringRef Path) {
// Quote a given string if it contains a space character.
std::string lld::quote(StringRef S) {
- if (S.find(' ') == StringRef::npos)
- return S;
- return ("\"" + S + "\"").str();
+ if (S.contains(' '))
+ return ("\"" + S + "\"").str();
+ return S;
}
std::string lld::rewritePath(StringRef S) {
OpenPOWER on IntegriCloud