summaryrefslogtreecommitdiffstats
path: root/lld/lib/Core/Reproduce.cpp
diff options
context:
space:
mode:
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