projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
db3d12f
)
cl::ParseCommandLineOptions(): Use StringRef to receive sys::path::filename() instead...
author
NAKAMURA Takumi
<geek4civic@gmail.com>
Wed, 23 Apr 2014 14:51:23 +0000
(14:51 +0000)
committer
NAKAMURA Takumi
<geek4civic@gmail.com>
Wed, 23 Apr 2014 14:51:23 +0000
(14:51 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206990
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Support/CommandLine.cpp
patch
|
blob
|
history
diff --git
a/lib/Support/CommandLine.cpp
b/lib/Support/CommandLine.cpp
index 6b32476e7f9a2d3b28c2707880e61ffd8e118175..37bbf48303a6d0b0f71552cd2e5f149effbf0b10 100644
(file)
--- 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<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';