[PATCH] D33184: [DWARF] - Make collectAddressRanges() return section index in addition to Low/High PC
Rafael Ávila de Espíndola via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 17 11:12:38 PDT 2017
rafael added inline comments.
================
Comment at: include/llvm/DebugInfo/DWARF/DWARFRelocMap.h:20
struct RelocAddrEntry {
uint8_t Width;
+ uint64_t SectionIndex;
----------------
Please rebase, as Width was removed.
================
Comment at: include/llvm/Object/ELFObjectFile.h:652
+ auto SectionsOrErr = EF.sections();
+ if (!SectionsOrErr)
+ return 0;
----------------
I think you can assert in here.
This function is passed a section, so whatever found it must have looked in the section table.
================
Comment at: lib/Object/COFFObjectFile.cpp:297
+uint64_t COFFObjectFile::getSectionIndex(DataRefImpl Sec) const {
+ // TODO: COFFObjectFile::getSectionIndex() not implemented
+ return -1LL;
----------------
This should be trivial to implement:
toSec(Sec) - SectionTable.
================
Comment at: lib/Object/MachOObjectFile.cpp:1824
+uint64_t MachOObjectFile::getSectionIndex(DataRefImpl Sec) const {
+ // TODO: MachOObjectFile::getSectionIndex() not implemented
+ return -1LL;
----------------
This is just "return Sec.d.a"
================
Comment at: lib/Object/WasmObjectFile.cpp:748
+ // TODO: WasmObjectFile::getSectionIndex() not implemented
+ return -1LL;
+}
----------------
This is just Sec.d.a;
https://reviews.llvm.org/D33184
More information about the llvm-commits
mailing list