[llvm] r207458 - DIE: Document some learnings about why the world isn't perfect.
David Blaikie
dblaikie at gmail.com
Mon Apr 28 15:41:39 PDT 2014
Author: dblaikie
Date: Mon Apr 28 17:41:39 2014
New Revision: 207458
URL: http://llvm.org/viewvc/llvm-project?rev=207458&view=rev
Log:
DIE: Document some learnings about why the world isn't perfect.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DIE.h
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DIE.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DIE.h?rev=207458&r1=207457&r2=207458&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DIE.h (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DIE.h Mon Apr 28 17:41:39 2014
@@ -124,6 +124,12 @@ protected:
/// Children DIEs.
///
+ // This can't be a vector<DIE> because pointer validity is requirent for the
+ // Parent pointer and DIEEntry.
+ // It can't be a list<DIE> because some clients need pointer validity before
+ // the object has been added to any child list
+ // (eg: DwarfUnit::constructVariableDIE). These aren't insurmountable, but may
+ // be more convoluted than beneficial.
std::vector<std::unique_ptr<DIE>> Children;
DIE *Parent;
More information about the llvm-commits
mailing list