[llvm] r227428 - CommandLineParser: Avoid non-static member nitializer(s).

NAKAMURA Takumi geek4civic at gmail.com
Thu Jan 29 03:07:00 PST 2015


Author: chapuni
Date: Thu Jan 29 05:06:59 2015
New Revision: 227428

URL: http://llvm.org/viewvc/llvm-project?rev=227428&view=rev
Log:
CommandLineParser: Avoid non-static member nitializer(s).

Modified:
    llvm/trunk/lib/Support/CommandLine.cpp

Modified: llvm/trunk/lib/Support/CommandLine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/CommandLine.cpp?rev=227428&r1=227427&r2=227428&view=diff
==============================================================================
--- llvm/trunk/lib/Support/CommandLine.cpp (original)
+++ llvm/trunk/lib/Support/CommandLine.cpp Thu Jan 29 05:06:59 2015
@@ -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);





More information about the llvm-commits mailing list