aboutsummaryrefslogtreecommitdiff
path: root/bolt
diff options
context:
space:
mode:
authorAlexander Yermolovich <ayermolo@meta.com>2023-07-13 10:44:29 -0700
committerAlexander Yermolovich <ayermolo@meta.com>2023-07-13 10:44:44 -0700
commit41afc42673144dffbe3e6e1719b51012ec3cbf5f (patch)
tree6e20c4efb65c6f6859706ebf5f80b18aaac9ed03 /bolt
parentc0de76cf9f06ba8356c212420d156d42ad1d15b8 (diff)
downloadllvm-41afc42673144dffbe3e6e1719b51012ec3cbf5f.zip
llvm-41afc42673144dffbe3e6e1719b51012ec3cbf5f.tar.gz
llvm-41afc42673144dffbe3e6e1719b51012ec3cbf5f.tar.bz2
[BOLT][DWARF][NFC] Set initial offset of DIE
Setting initial offset of DIE to input DIE. This is to make "printf" debugging easier. Reviewed By: maksfb Differential Revision: https://reviews.llvm.org/D155031
Diffstat (limited to 'bolt')
-rw-r--r--bolt/lib/Core/DIEBuilder.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/bolt/lib/Core/DIEBuilder.cpp b/bolt/lib/Core/DIEBuilder.cpp
index 4421daf..2344a69c 100644
--- a/bolt/lib/Core/DIEBuilder.cpp
+++ b/bolt/lib/Core/DIEBuilder.cpp
@@ -290,6 +290,10 @@ DIE *DIEBuilder::constructDIEFast(DWARFDie &DDie, DWARFUnit &U,
DIEInfo &DieInfo = getDIEInfo(UnitId, *Idx);
uint64_t Offset = DDie.getOffset();
+ // Just for making debugging easier.
+ // DIE dump is not very useful.
+ // It's nice to know original offset from which this DIE was constructed.
+ DieInfo.Die->setOffset(Offset);
uint64_t NextOffset = Offset;
DWARFDataExtractor Data = U.getDebugInfoExtractor();
DWARFDebugInfoEntry DDIEntry;