summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/CommandLine.cpp
diff options
context:
space:
mode:
authorChris Bieneman <beanz@apple.com>2015-01-28 22:25:00 +0000
committerChris Bieneman <beanz@apple.com>2015-01-28 22:25:00 +0000
commitb6866425f3be0c97d7d191b4326c2fbc865b7935 (patch)
tree3c62ca3d6d0ecc20b1f87dc9e7933d9e2c729208 /llvm/lib/Support/CommandLine.cpp
parent538fec0e59c72a5a8c8f9a6a53fb1ac3334c6ee8 (diff)
downloadbcm5719-llvm-b6866425f3be0c97d7d191b4326c2fbc865b7935.tar.gz
bcm5719-llvm-b6866425f3be0c97d7d191b4326c2fbc865b7935.zip
Build fix for Visual Studio. NFC.
llvm-svn: 227385
Diffstat (limited to 'llvm/lib/Support/CommandLine.cpp')
-rw-r--r--llvm/lib/Support/CommandLine.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp
index bdebe97d872..2ca9caa1d91 100644
--- a/llvm/lib/Support/CommandLine.cpp
+++ b/llvm/lib/Support/CommandLine.cpp
@@ -87,7 +87,7 @@ class CommandLineParser {
public:
// Globals for name and overview of program. Program name is not a string to
// avoid static ctor/dtor issues.
- char ProgramName[80] = "<premain>";
+ std::string ProgramName;
const char *ProgramOverview = nullptr;
// This collects additional help to be printed.
@@ -837,10 +837,7 @@ void CommandLineParser::ParseCommandLineOptions(int argc,
argc = static_cast<int>(newArgv.size());
// Copy the program name into ProgName, making sure not to overflow it.
- 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';
+ ProgramName = sys::path::filename(argv[0]);
ProgramOverview = Overview;
bool ErrorParsing = false;
OpenPOWER on IntegriCloud