aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCDisassembler/Disassembler.cpp
diff options
context:
space:
mode:
authorManman Ren <manman.ren@gmail.com>2013-10-01 19:52:23 +0000
committerManman Ren <manman.ren@gmail.com>2013-10-01 19:52:23 +0000
commit8990d7ee842a2f4014046a7dc7eb4e1bdb9ef4c2 (patch)
tree66258883a93697129b5f4afacace222c0ab471ab /llvm/lib/MC/MCDisassembler/Disassembler.cpp
parenta4da6fb53577d16b61fab965284dbf4cb5a31ff2 (diff)
downloadllvm-8990d7ee842a2f4014046a7dc7eb4e1bdb9ef4c2.zip
llvm-8990d7ee842a2f4014046a7dc7eb4e1bdb9ef4c2.tar.gz
llvm-8990d7ee842a2f4014046a7dc7eb4e1bdb9ef4c2.tar.bz2
Debug Info: remove duplication of DIEs when a DIE is part of the type system
and it is shared across CUs. We add a few maps in DwarfDebug to map MDNodes for the type system to the corresponding DIEs: MDTypeNodeToDieMap, MDSPNodeToDieMap, and MDStaticMemberNodeToDieMap. These DIEs can be shared across CUs, that is why we keep the maps in DwarfDebug instead of CompileUnit. Sometimes, when we try to add an attribute to a DIE, the DIE is not yet added to its owner yet, so we don't know whether we should use ref_addr or ref4. We create a worklist that will be processed during finalization to add attributes with the correct form (ref_addr or ref4). We add addDIEEntry to DwarfDebug to be a wrapper around DIE->addValue. It checks whether we know the correct form, if not, we update the worklist (DIEEntryWorklist). A testing case is added to show that we only create a single DIE for a type MDNode and we use ref_addr to refer to the type DIE. llvm-svn: 191792
Diffstat (limited to 'llvm/lib/MC/MCDisassembler/Disassembler.cpp')
0 files changed, 0 insertions, 0 deletions