diff options
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(). |