[PATCH] D70720: [llvm-objdump] Display locations of variables alongside disassembly

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 3 09:28:14 PST 2019


aprantl added inline comments.


================
Comment at: llvm/tools/llvm-objdump/llvm-objdump.cpp:589
+    unsigned Opcode = Op.getCode();
+    if (Opcode == dwarf::DW_OP_piece) {
+      // DW_OP_piece - record piece of larger object.
----------------
ostannard wrote:
> aprantl wrote:
> > Can you convert this into a switch()?
> A few of these handle 32 opcodes (e.g. `DW_OP_reg0`..`DW_OP_reg31`), so converting it to a switch would involve expanding them out to 32 case statements each.
You can roll these cases into a default: cause if you don't feel like expanding 32 lines,


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70720/new/

https://reviews.llvm.org/D70720





More information about the llvm-commits mailing list