[PATCH] D81826: [DWARFYAML][debug_abbrev] Make the abbreviation code optional.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 15 02:41:29 PDT 2020


grimar added inline comments.


================
Comment at: llvm/lib/ObjectYAML/DWARFEmitter.cpp:95
+    AbbrevCode =
+        AbbrevDecl.Code ? (uint64_t) * (AbbrevDecl.Code) : AbbrevCode + 1;
+    encodeULEB128(AbbrevCode, OS);
----------------
Looks unformatted.

It is also more common to write in the following way I think:

```
(uint64_t)*AbbrevDecl.Code
```

(i.e. no brackets around the `AbbrevDecl.Code`)


================
Comment at: llvm/test/tools/yaml2obj/ELF/DWARF/debug-abbrev.yaml:278
+      Attributes: []
+    - Code: 4
+      Tag:        DW_TAG_subprogram
----------------
Could you add a one more `DW_TAG_subprogram` with the same Code and one more `DW_TAG_subprogram` after it
somewhere here to demostrate the behavior in this case?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81826





More information about the llvm-commits mailing list