//===----------------------------------------------------------------------===//
#include "DIE.h"
+
+#include "DwarfCompileUnit.h"
#include "DwarfDebug.h"
#include "DwarfUnit.h"
#include "llvm/ADT/Twine.h"
if (Form == dwarf::DW_FORM_ref_addr) {
const DwarfDebug *DD = AP->getDwarfDebug();
- unsigned Addr = Entry->getOffset();
+ unsigned Addr = Entry.getOffset();
assert(!DD->useSplitDwarf() && "TODO: dwo files can't have relocations.");
// For DW_FORM_ref_addr, output the offset from beginning of debug info
// section. Entry->getOffset() returns the offset from start of the
// compile unit.
- DwarfCompileUnit *CU = DD->lookupUnit(Entry->getUnit());
+ DwarfCompileUnit *CU = DD->lookupUnit(Entry.getUnit());
assert(CU && "CUDie should belong to a CU.");
Addr += CU->getDebugInfoOffset();
if (AP->MAI->doesDwarfUseRelocationsAcrossSections())
CU->getSectionSym(),
DIEEntry::getRefAddrSize(AP));
} else
- AP->EmitInt32(Entry->getOffset());
+ AP->EmitInt32(Entry.getOffset());
}
unsigned DIEEntry::getRefAddrSize(AsmPrinter *AP) {
#ifndef NDEBUG
void DIEEntry::print(raw_ostream &O) const {
- O << format("Die: 0x%lx", (long)(intptr_t)Entry);
+ O << format("Die: 0x%lx", (long)(intptr_t)&Entry);
}
#endif