[PATCH] D37123: [dwarfdump] Pretty print location expressions and location lists

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 25 13:37:24 PDT 2017


rnk marked 6 inline comments as done.
rnk added inline comments.


================
Comment at: llvm/include/llvm/DebugInfo/DWARFExpression.h:80
+    uint32_t getEndOffset() { return EndOffset; }
+    bool Extract(DataExtractor Data, const DWARFUnit *U, uint32_t Offset);
+    bool isError() { return Error; }
----------------
aprantl wrote:
> `extract`
Hm, this appears to be a duplicate file from the rebase. I've removed it.


================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFExpression.cpp:25
+
+typedef std::vector<DWARFExpression::Op::Description> DescVector;
+
----------------
Maybe this could be an ArrayRef.


================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFExpression.cpp:106
+  static DescVector &Descriptions = getDescriptions();
+  assert(OpCode < Descriptions.size());
+  return Descriptions[OpCode];
----------------
aprantl wrote:
> Does this assert on invalid DWARF? Or is this an internal consistency check?
`Descriptions` actually has 256 entries, and the opcodes are one byte, so this can't fail as written.


https://reviews.llvm.org/D37123





More information about the llvm-commits mailing list