[PATCH] D87179: Fix debug_abbrev emitter to only assign table id once
Xing GUO via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 5 18:48:38 PDT 2020
Higuoxing added inline comments.
================
Comment at: llvm/test/ObjectYAML/MachO/DWARF-debug_info.yaml:10
--- !mach-o
-FileHeader:
+FileHeader:
magic: 0xFEEDFACF
----------------
This change is not relevant and there are some test cases that have the similar format issue. Please do it in a separate patch.
================
Comment at: llvm/test/ObjectYAML/MachO/DWARF-debug_info.yaml:858
AbbrevTableID: 1
- AbbrOffset: 16
+ AbbrOffset: 23
Entries:
----------------
We can simply remove this line since yaml2obj is able to calculate the value of `debug_abbrev_offset` for us.
================
Comment at: llvm/tools/obj2yaml/dwarf2yaml.cpp:27-28
for (auto AbbrvDeclSet : *AbbrevSetPtr) {
+ if (AbbrvDeclSet.second.begin() == AbbrvDeclSet.second.end())
+ continue;
Y.DebugAbbrev.emplace_back();
----------------
Do we really need this check here? I think it will prevent us from dumping an empty abbrev table.
```
debug_abbrev:
- ID: 0
Table:
- Code: 1
Tag: DW_TAG_compile_unit
Children: DW_CHILDREN_yes
Attributes:
- Attribute: DW_AT_producer
Form: DW_FORM_strp
- ID: 1 ## This table will not be dumped.
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87179/new/
https://reviews.llvm.org/D87179
More information about the llvm-commits
mailing list