[PATCH] D44033: [WebAssembly] Attach a name to globals similarly to function naming

Nicholas Wilson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 5 04:19:05 PST 2018


ncw marked an inline comment as done.
ncw added inline comments.


================
Comment at: lib/Object/WasmObjectFile.cpp:428
         unsigned GlobalIndex = Info.ElementIndex - NumImportedGlobals;
-        GlobalType = &Globals[GlobalIndex].Type;
+        auto &Global = Globals[GlobalIndex];
+        GlobalType = &Global.Type;
----------------
sbc100 wrote:
> I'd rather not use `auto` unless the type is already present on the same line (i.e. when using dyn_cast).    
Committed with that fix


Repository:
  rL LLVM

https://reviews.llvm.org/D44033





More information about the llvm-commits mailing list