I'm not sure this doesn't break some intended layering, but the end
goal is to call it from constructInportedEntityDIE which is in
DwarfUnit (along with the others getOrCreate* helpers) so I suppose
it's OK to move it there. (Another option is to move everything down
into DwarfCompileUnit, but if you want to create some other types of
Units, you might need this functionality in the base class).
BTW, although I think I can imaging where you are going to with the
code shuffling you are doing around the Dwarf(Compile)Unit, could you
explain a bit what the expected end result hierarchy looks like, and
what the responsabilities of each level will be? And maybe update the
file header comments of these 2 classes to reflect the difference.
Thanks!