[PATCH] D42246: [NFC] Generalize DwarfAccelTable
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 18 09:29:45 PST 2018
aprantl added inline comments.
================
Comment at: lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp:35
+/// Return the size (in bytes) for the given Form.
+static unsigned GetSizeForForm(uint16_t Form) {
+ switch (Form) {
----------------
Could this be merged with DIEInteger::SizeOf() ?
================
Comment at: lib/CodeGen/AsmPrinter/DwarfAccelTable.h:169
#ifndef NDEBUG
void print(raw_ostream &OS) const {
+ OS << " Offset: " << Die->getOffset() << "\n";
----------------
Is this code not needed for dwarfdump?
================
Comment at: lib/CodeGen/AsmPrinter/DwarfAccelTable.h:188
+ // Third atom is a flag field that's always zero.
+ case 2:
+ return 0;
----------------
```
default: return 0;
}
}
```
not sure if actually better :-)
================
Comment at: lib/CodeGen/AsmPrinter/DwarfAccelTable.h:242
// Allocator for HashData and HashDataContents.
BumpPtrAllocator Allocator;
----------------
Would be nice to doxygenify these comments in a separate NFC commit. (no need for a review)
Repository:
rL LLVM
https://reviews.llvm.org/D42246
More information about the llvm-commits
mailing list