OSDN Git Service
(root)
/
android-x86
/
external-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
6b32476
..
37bbf48
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';