From c2c6649d612f25bd7c8a540bcaebd3b0be62b45e 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. llvm-svn: 206990 --- llvm/lib/Support/CommandLine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp index 6b32476e7f9a..37bbf48303a6 100644 --- a/llvm/lib/Support/CommandLine.cpp +++ b/llvm/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';