Added ability to append new entries to DIE. This is useful to standadize DWARF4
Split Dwarf, and simplify implementation of DWARF5.
Multiple DIEs can share an abbrev. So currently limitation is that only unique
Attributes can be added.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
bolt/lib/Core/DebugData.cpp | ||
---|---|---|
902 | nit: add braces for the if since the nested for is braced. | |
bolt/lib/Rewrite/DWARFRewriter.cpp | ||
603 | Accidental? | |
bolt/test/X86/insert-debug-info-entry.test | ||
9 | Could you add a description what the test is checking? If you are inserting a new attribute, perhaps you should check that it's introduced by BOLT and not by llc? |
bolt/lib/Core/DebugData.cpp | ||
---|---|---|
422 | You can take a look to support::endian::Writer, here is an example I'm using in golang support: template <typename T> static T writeEndian(BinaryContext &BC, T Val) { T ret; SmallVector<char, sizeof(T)> Tmp; raw_svector_ostream OS(Tmp); if (BC.AsmInfo->isLittleEndian()) support::endian::Writer<support::little>(OS).write<T>(Val); else support::endian::Writer<support::big>(OS).write<T>(Val); memcpy(&ret, OS.str().data(), sizeof(T)); return ret; } |
bolt/lib/Core/DebugData.cpp | ||
---|---|---|
422 | I think it should be part of a different commit thought. |
bolt/lib/Core/DebugData.cpp | ||
---|---|---|
422 | Since it's moved code, it makes sense. |