[PATCH] D84386: [DWARFYAML] Add support for emitting custom operands for range list entry.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 23 02:20:56 PDT 2020


grimar added a comment.

Looks fine to me either.



================
Comment at: llvm/lib/ObjectYAML/DWARFEmitter.cpp:478
+        errc::invalid_argument,
+        "the number of operands should match the number of their types");
+
----------------
Does it make sense to print the number of types and values in the message?
e.g.

"the number of operands (5) should match the number of their types (4)"


================
Comment at: llvm/lib/ObjectYAML/DWARFEmitter.cpp:531
+
+  switch ((uint8_t)Entry.Operator) {
   case dwarf::DW_RLE_end_of_list:
----------------
Do you need a cast here?


================
Comment at: llvm/test/tools/yaml2obj/ELF/DWARF/debug-rnglists.yaml:650
+              Types:    [ Unsigned8, Unsigned16, Unsigned32, Unsigned64,         ULEB128, SLEB128 ]
+              Values:   [ 0x01,      0x1234,     0x12345678, 0x1234567890abcdef, 0x1234,  0xfffffffffffffffd ] ## 0xfffffffffffffffd is -3
+            - Operator: 0xff
----------------
What about adding a test with mismatching types/values.
e.g

```
 Types:    [ Unsigned8 ]
 Values:   [ 0x1234567890abcdef ] 
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D84386





More information about the llvm-commits mailing list