mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-04 05:31:51 +00:00
cl::ParseCommandLineOptions(): Use StringRef to receive sys::path::filename() instead of std::string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206990 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
db3d12f3be
commit
c6c61c39d3
@ -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';
|
||||
|
Loading…
x
Reference in New Issue
Block a user