[PATCH] D16077: DIBuilder support DI Macro creation
Amjad Aboud via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 25 06:51:47 PST 2016
aaboud added a comment.
In http://reviews.llvm.org/D16077#332403, @aprantl wrote:
> Just one final question: Why is replaceArrays() necessary? We need it for DICompositeType because composite types may be recursive. Is that also the case for DIMacroNodeArray?
The reason why DIMacroFile need the replaceArrays() function is that when we create the DIMacroFile, we still do not have the list of children nodes of that DIE.
So, we create an empty one,,and later, when we finalize the DIBuilder and all Macro DIEs are already created, only then we can fix the children list of the DIMacroFile and replace the empty list with the actual children list.
If I understand your concern well, you are suggesting that instead of the "replaceArrays()" function, we implement a "DIMacroFile::replaceMacros()" similar to the function of the DICompileUnit, correct?
More information about the llvm-commits