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

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 2 11:21:54 PST 2018


sbc100 accepted this revision.
sbc100 added inline comments.
This revision is now accepted and ready to land.


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


Repository:
  rL LLVM

https://reviews.llvm.org/D44033





More information about the llvm-commits mailing list