From c6c61c39d3be78d8c91692fac1f73f6ba0864629 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Wed, 23 Apr 2014 14:51:23 +0000 Subject: [PATCH] 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 --- lib/Support/CommandLine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Support/CommandLine.cpp b/lib/Support/CommandLine.cpp index 6b32476e7f9..37bbf48303a 100644 --- a/lib/Support/CommandLine.cpp +++ b/lib/Support/CommandLine.cpp @@ -748,7 +748,7 @@ void cl::ParseCommandLineOptions(int argc, const char * const *argv, argc = static_cast(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';