aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/CommandLine.cpp
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2014-04-23 14:51:23 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2014-04-23 14:51:23 +0000
commitc2c6649d612f25bd7c8a540bcaebd3b0be62b45e (patch)
treec7489eb6819fb4b3ed78f29820cea57c1b7fb646 /llvm/lib/Support/CommandLine.cpp
parentfe16a620a795ca05fea079c4f1ceed313e711ddb (diff)
downloadllvm-c2c6649d612f25bd7c8a540bcaebd3b0be62b45e.zip
llvm-c2c6649d612f25bd7c8a540bcaebd3b0be62b45e.tar.gz
llvm-c2c6649d612f25bd7c8a540bcaebd3b0be62b45e.tar.bz2
cl::ParseCommandLineOptions(): Use StringRef to receive sys::path::filename() instead of std::string.
llvm-svn: 206990
Diffstat (limited to 'llvm/lib/Support/CommandLine.cpp')
-rw-r--r--llvm/lib/Support/CommandLine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp
index 6b32476..37bbf48 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<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';