[PATCH] D42495: [WebAssembly] Add symbol table to LLVM, 2/2

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 29 17:24:55 PST 2018


sbc100 added a comment.

Some initial comments.  Looks good in general!

Although I like small changes, I'm not sure I want to land that part 1 of this separately.   Lets see how this evolves and how they look when combined too.



================
Comment at: lib/MC/WasmObjectWriter.cpp:578
-  if (LastFragmentSize == 0)
-    DataBytes.resize(DataBytes.size() + 1);
   DEBUG(dbgs() << "addData -> " << DataBytes.size() << "\n");
----------------
Nice!


================
Comment at: lib/MC/WasmObjectWriter.cpp:1212
+      if (WS.isDefined()) {
+        // A definition. Write out the Global definition.
+        WasmIndex = NumGlobalImports + Globals.size();
----------------
If this only __stack_pointer right now, can we wait on adding support for defined globals?  Can this, and WASM_COMDAT_GLOBAL itself be a separate change?


Repository:
  rL LLVM

https://reviews.llvm.org/D42495





More information about the llvm-commits mailing list