[PATCH] D37497: [WebAssembly] Fix getSymbolValue() for globals that are not 32-bit const values.

Don Hinton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 5 18:03:12 PDT 2017


hintonda added inline comments.


================
Comment at: lib/Object/WasmObjectFile.cpp:794
     const wasm::WasmGlobal& Global = Globals[GlobalIndex];
-    return Global.InitExpr.Value.Int32;
+    switch (Global.InitExpr.Opcode) {
+      case wasm::WASM_OPCODE_I32_CONST:
----------------
Is there any reason not to handle all 5 fields?


https://reviews.llvm.org/D37497





More information about the llvm-commits mailing list