1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00

cl::ParseCommandLineOptions(): Use StringRef to receive sys::path::filename() instead of std::string.

llvm-svn: 206990
This commit is contained in:
NAKAMURA Takumi 2014-04-23 14:51:23 +00:00
parent c99c7eb62c
commit dd0e1d3175

View File

@ -748,7 +748,7 @@ void cl::ParseCommandLineOptions(int argc, const char * const *argv,
argc = static_cast<int>(newArgv.size());
// Copy the program name into ProgName, making sure not to overflow it.
std::string ProgName = sys::path::filename(argv[0]);
StringRef ProgName = sys::path::filename(argv[0]);
size_t Len = std::min(ProgName.size(), size_t(79));
memcpy(ProgramName, ProgName.data(), Len);
ProgramName[Len] = '\0';