[PATCH] D80203: [ObjectYAML][DWARF] Add DWARF entry in ELFYAML.
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 25 03:10:42 PDT 2020
grimar accepted this revision.
grimar added a comment.
This revision is now accepted and ready to land.
LGTM with 2 last comments addressed.
Please wait for @jhenderson approvement too.
================
Comment at: llvm/lib/ObjectYAML/ELFEmitter.cpp:158
+ ELFYAML::Section *YAMLSec);
+ static uint64_t emitDWARF(Elf_Shdr &SHeader, StringRef Name,
+ const DWARFYAML::Data &DWARF, raw_ostream &OS);
----------------
You do not need to make `emitDWARF` to be a member. It can be just a static helper function.
================
Comment at: llvm/lib/ObjectYAML/ELFEmitter.cpp:753
+ return true;
+ return false;
+}
----------------
Just
```
return (!Name.empty() && Name[0] == '.' && DebugSecNames.count(Name.drop_front()));
```
Perhaps also worth adding a comment. I guess for people who are unfamilar with what is going on here
it might be not that easy to understand the logic.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80203/new/
https://reviews.llvm.org/D80203
More information about the llvm-commits
mailing list