[PATCH] D51320: [WebAssembly] Made disassembler only use stack instructions.

Thomas Lively via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 27 15:34:25 PDT 2018


tlively added inline comments.


================
Comment at: utils/TableGen/WebAssemblyDisassemblerEmitter.cpp:47
+    // the instructions for which this is 1.
+    auto Bit = Def.getValue("StackBased")->getValue()->getCastTo(BitRecTy::get());
+    auto IsStackBased = Bit && reinterpret_cast<const BitInit *>(Bit)->getValue();
----------------
`Def.getValueAsBit("StackBased")` might be cleaner here. It assumes "StackBased" is present, but so does the current code.


Repository:
  rL LLVM

https://reviews.llvm.org/D51320





More information about the llvm-commits mailing list