[llvm] r206990 - cl::ParseCommandLineOptions(): Use StringRef to receive sys::path::filename() instead of std::string.

NAKAMURA Takumi geek4civic at gmail.com
Wed Apr 23 07:51:23 PDT 2014


Author: chapuni
Date: Wed Apr 23 09:51:23 2014
New Revision: 206990

URL: http://llvm.org/viewvc/llvm-project?rev=206990&view=rev
Log:
cl::ParseCommandLineOptions(): Use StringRef to receive sys::path::filename() instead of std::string.

Modified:
    llvm/trunk/lib/Support/CommandLine.cpp

Modified: llvm/trunk/lib/Support/CommandLine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/CommandLine.cpp?rev=206990&r1=206989&r2=206990&view=diff
==============================================================================
--- llvm/trunk/lib/Support/CommandLine.cpp (original)
+++ llvm/trunk/lib/Support/CommandLine.cpp Wed Apr 23 09:51:23 2014
@@ -748,7 +748,7 @@ void cl::ParseCommandLineOptions(int arg
   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';





More information about the llvm-commits mailing list