[Lldb-commits] [PATCH] D115662: [lldb][DWARF] Remove duplicate DIE type assignment

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Jan 12 06:14:03 PST 2022


labath added a comment.

I am sorry for the delay. This is quite messy so it took me a while to form an opinion on this. I think option one would be the best choice. Doing it there means the these would get set in a central place (that is still fairly near the place where the type is being constructed). The main thing which makes this confusing is the name, and if we change that to something like FinalizeType, then it would look natural.

As an alternative (though I don't know if this would work), we could make a utility function that constructs a type and does all of these finalization steps. That way it would be impossible to forget to add a type to the list, or to add it twice. (I know that there can be multiple DIEs referring to the same type, so it's fine if some extra DIEToType lines remain, but we shouldn't need to set the symbol context scope, or add to the type list twice).

Would you be interested in trying that out?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115662/new/

https://reviews.llvm.org/D115662



More information about the lldb-commits mailing list