[PATCH] D37497: [WebAssembly] Only treat imports/exports as symbols when reading relocatable object files

Derek Schuff via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 6 14:40:39 PDT 2017


dschuff accepted this revision.
dschuff added a comment.
This revision is now accepted and ready to land.

otherwise LGTM



================
Comment at: lib/Object/WasmObjectFile.cpp:307
+
+  // Add imports to symbol table
+  size_t ImportIndex = 0;
----------------
Even though this is the only user, it might make sense to pull this new bit into its own function, since it's not strictly part of parsing the linking section.


================
Comment at: lib/Object/WasmObjectFile.cpp:325
+      DEBUG(dbgs() << "Adding import: " << Symbols.back()
+                   << " sym index:" << Symbols.size() << "\n");
+    default:
----------------
Nit: could we make this an explicit break here? I feel like this is just asking to get broken (no pun intended) when we add another case.


https://reviews.llvm.org/D37497





More information about the llvm-commits mailing list