diff options
author | Mehdi Amini <mehdi.amini@apple.com> | 2016-10-05 01:32:41 +0000 |
---|---|---|
committer | Mehdi Amini <mehdi.amini@apple.com> | 2016-10-05 01:32:41 +0000 |
commit | ec4fb5ba9736c1910b8a1631c46d653172e5a4df (patch) | |
tree | c479d07a6d2c2a68c4ee6f2a9fe6ed291cefcc2b /llvm/lib/Support/CommandLine.cpp | |
parent | 9ff9713f8a2fba396e4d40cb180b52a896e5bdd1 (diff) | |
download | bcm5719-llvm-ec4fb5ba9736c1910b8a1631c46d653172e5a4df.tar.gz bcm5719-llvm-ec4fb5ba9736c1910b8a1631c46d653172e5a4df.zip |
Use StringRef in StringSaver API (NFC)
llvm-svn: 283290
Diffstat (limited to 'llvm/lib/Support/CommandLine.cpp')
-rw-r--r-- | llvm/lib/Support/CommandLine.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp index 21d4231215a..c5ca2149de3 100644 --- a/llvm/lib/Support/CommandLine.cpp +++ b/llvm/lib/Support/CommandLine.cpp @@ -726,7 +726,7 @@ void cl::TokenizeGNUCommandLine(StringRef Src, StringSaver &Saver, // End the token if this is whitespace. if (isWhitespace(Src[I])) { if (!Token.empty()) - NewArgv.push_back(Saver.save(StringRef(Token))); + NewArgv.push_back(Saver.save(StringRef(Token)).data()); Token.clear(); continue; } @@ -737,7 +737,7 @@ void cl::TokenizeGNUCommandLine(StringRef Src, StringSaver &Saver, // Append the last token after hitting EOF with no whitespace. if (!Token.empty()) - NewArgv.push_back(Saver.save(StringRef(Token))); + NewArgv.push_back(Saver.save(StringRef(Token)).data()); // Mark the end of response files if (MarkEOLs) NewArgv.push_back(nullptr); @@ -818,7 +818,7 @@ void cl::TokenizeWindowsCommandLine(StringRef Src, StringSaver &Saver, if (State == UNQUOTED) { // Whitespace means the end of the token. if (isWhitespace(Src[I])) { - NewArgv.push_back(Saver.save(StringRef(Token))); + NewArgv.push_back(Saver.save(StringRef(Token)).data()); Token.clear(); State = INIT; // Mark the end of lines in response files @@ -853,7 +853,7 @@ void cl::TokenizeWindowsCommandLine(StringRef Src, StringSaver &Saver, } // Append the last token after hitting EOF with no whitespace. if (!Token.empty()) - NewArgv.push_back(Saver.save(StringRef(Token))); + NewArgv.push_back(Saver.save(StringRef(Token)).data()); // Mark the end of response files if (MarkEOLs) NewArgv.push_back(nullptr); @@ -962,7 +962,7 @@ void cl::ParseEnvironmentOptions(const char *progName, const char *envVar, SmallVector<const char *, 20> newArgv; BumpPtrAllocator A; StringSaver Saver(A); - newArgv.push_back(Saver.save(progName)); + newArgv.push_back(Saver.save(progName).data()); // Parse the value of the environment variable into a "command line" // and hand it off to ParseCommandLineOptions(). |