[PATCH] D43525: Inline a trivial ctor.

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 20 13:31:14 PST 2018


ruiu created this revision.
ruiu added a reviewer: sbc100.
Herald added a subscriber: aheejin.

Inline a trivial ctor.


https://reviews.llvm.org/D43525

Files:
  lld/wasm/Driver.cpp


Index: lld/wasm/Driver.cpp
===================================================================
--- lld/wasm/Driver.cpp
+++ lld/wasm/Driver.cpp
@@ -33,15 +33,9 @@
 using namespace lld;
 using namespace lld::wasm;
 
-namespace {
-
-// Parses command line options.
-class WasmOptTable : public llvm::opt::OptTable {
-public:
-  WasmOptTable();
-  llvm::opt::InputArgList parse(ArrayRef<const char *> Argv);
-};
+Configuration *lld::wasm::Config;
 
+namespace {
 // Create enum with OPT_xxx values for each option in Options.td
 enum {
   OPT_INVALID = 0,
@@ -55,16 +49,13 @@
   void link(ArrayRef<const char *> ArgsArr);
 
 private:
-  void createFiles(llvm::opt::InputArgList &Args);
+  void createFiles(opt::InputArgList &Args);
   void addFile(StringRef Path);
   void addLibrary(StringRef Name);
   std::vector<InputFile *> Files;
 };
-
 } // anonymous namespace
 
-Configuration *lld::wasm::Config;
-
 bool lld::wasm::link(ArrayRef<const char *> Args, bool CanExitEarly,
                      raw_ostream &Error) {
   errorHandler().LogName = Args[0];
@@ -89,8 +80,6 @@
   return !errorCount();
 }
 
-// Create OptTable
-
 // Create prefix string literals used in Options.td
 #define PREFIX(NAME, VALUE) const char *const NAME[] = VALUE;
 #include "Options.inc"
@@ -105,6 +94,12 @@
 #undef OPTION
 };
 
+class WasmOptTable : public llvm::opt::OptTable {
+public:
+  WasmOptTable() : OptTable(OptInfo) {}
+  opt::InputArgList parse(ArrayRef<const char *> Argv);
+};
+
 // Set color diagnostics according to -color-diagnostics={auto,always,never}
 // or -no-color-diagnostics flags.
 static void handleColorDiagnostics(opt::InputArgList &Args) {
@@ -141,8 +136,6 @@
   WasmOptTable().PrintHelp(outs(), Argv0, "LLVM Linker", false);
 }
 
-WasmOptTable::WasmOptTable() : OptTable(OptInfo) {}
-
 opt::InputArgList WasmOptTable::parse(ArrayRef<const char *> Argv) {
   SmallVector<const char *, 256> Vec(Argv.data(), Argv.data() + Argv.size());
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43525.135132.patch
Type: text/x-patch
Size: 1943 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180220/8aea2ade/attachment.bin>


More information about the llvm-commits mailing list