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

Don Hinton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 6 12:29:47 PDT 2017


hintonda added a comment.

Minor nit...



================
Comment at: lib/Object/WasmObjectFile.cpp:819
+    // WasmSymbols are only create for I32_CONST globals
+    assert(Global.InitExpr.Opcode == wasm::WASM_OPCODE_I32_CONST);
     return Global.InitExpr.Value.Int32;
----------------
Could you move the comment into the assert (here and elsewhere)?  i.e.:

```
assert(Global.InitExpr.Opcode == wasm::WASM_OPCODE_I32_CONST && "WasmSymbols are only create for I32_CONST globals");
```


https://reviews.llvm.org/D37497





More information about the llvm-commits mailing list