CommandLineParser: Avoid non-static member nitializer(s).
authorNAKAMURA Takumi <geek4civic@gmail.com>
Thu, 29 Jan 2015 11:06:59 +0000 (11:06 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Thu, 29 Jan 2015 11:06:59 +0000 (11:06 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227428 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/CommandLine.cpp

index 2ca9caa..5cda94b 100644 (file)
@@ -88,7 +88,7 @@ public:
   // Globals for name and overview of program.  Program name is not a string to
   // avoid static ctor/dtor issues.
   std::string ProgramName;
-  const char *ProgramOverview = nullptr;
+  const char *ProgramOverview;
 
   // This collects additional help to be printed.
   std::vector<const char *> MoreHelp;
@@ -97,7 +97,9 @@ public:
   SmallVector<Option *, 4> SinkOpts;
   StringMap<Option *> OptionsMap;
 
-  Option *ConsumeAfterOpt = nullptr; // The ConsumeAfter option if it exists.
+  Option *ConsumeAfterOpt; // The ConsumeAfter option if it exists.
+
+  CommandLineParser() : ProgramOverview(nullptr), ConsumeAfterOpt(nullptr) {}
 
   void ParseCommandLineOptions(int argc, const char *const *argv,
                                const char *Overview);