[WebAssembly] Do not use default arguments for SymbolTable.
authorRui Ueyama <ruiu@google.com>
Wed, 28 Feb 2018 00:37:03 +0000 (00:37 +0000)
committerRui Ueyama <ruiu@google.com>
Wed, 28 Feb 2018 00:37:03 +0000 (00:37 +0000)
Differential Revision: https://reviews.llvm.org/D43727

llvm-svn: 326282

lld/wasm/Driver.cpp
lld/wasm/SymbolTable.h

index 52f82dd..e68a7ce 100644 (file)
@@ -300,10 +300,10 @@ void LinkerDriver::link(ArrayRef<const char *> ArgsArr) {
         "__wasm_call_ctors", &NullSignature, WASM_SYMBOL_VISIBILITY_HIDDEN);
     WasmSym::StackPointer = Symtab->addSyntheticGlobal(
         "__stack_pointer", WASM_SYMBOL_VISIBILITY_HIDDEN, StackPointer);
-    WasmSym::HeapBase = Symtab->addSyntheticDataSymbol("__heap_base");
+    WasmSym::HeapBase = Symtab->addSyntheticDataSymbol("__heap_base", 0);
     WasmSym::DsoHandle = Symtab->addSyntheticDataSymbol(
         "__dso_handle", WASM_SYMBOL_VISIBILITY_HIDDEN);
-    WasmSym::DataEnd = Symtab->addSyntheticDataSymbol("__data_end");
+    WasmSym::DataEnd = Symtab->addSyntheticDataSymbol("__data_end", 0);
 
     if (!Config->Entry.empty())
       EntrySym = Symtab->addUndefinedFunction(Config->Entry, 0, nullptr,
index d5ea6ca..ac1aa29 100644 (file)
@@ -49,10 +49,10 @@ public:
   ObjFile *findComdat(StringRef Name) const;
 
   Symbol *addDefinedFunction(StringRef Name, uint32_t Flags, InputFile *File,
-                             InputFunction *Function = nullptr);
+                             InputFunction *Function);
   Symbol *addDefinedData(StringRef Name, uint32_t Flags, InputFile *File,
-                         InputSegment *Segment = nullptr, uint32_t Address = 0,
-                         uint32_t Size = 0);
+                         InputSegment *Segment, uint32_t Address,
+                         uint32_t Size);
   Symbol *addDefinedGlobal(StringRef Name, uint32_t Flags, InputFile *File,
                            InputGlobal *G);
 
@@ -65,12 +65,12 @@ public:
   void addLazy(ArchiveFile *F, const Archive::Symbol *Sym);
   bool addComdat(StringRef Name, ObjFile *);
 
-  DefinedData *addSyntheticDataSymbol(StringRef Name, uint32_t Flags = 0);
+  DefinedData *addSyntheticDataSymbol(StringRef Name, uint32_t Flags);
   DefinedGlobal *addSyntheticGlobal(StringRef Name, uint32_t Flags,
                                     InputGlobal *Global);
   DefinedFunction *addSyntheticFunction(StringRef Name,
                                         const WasmSignature *Type,
-                                        uint32_t Flags = 0);
+                                        uint32_t Flags);
 
 private:
   std::pair<Symbol *, bool> insert(StringRef Name);