]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - opencl/llvm.git/commitdiff
DIE: Document some learnings about why the world isn't perfect.
authorDavid Blaikie <dblaikie@gmail.com>
Mon, 28 Apr 2014 22:41:39 +0000 (22:41 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Mon, 28 Apr 2014 22:41:39 +0000 (22:41 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207458 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/DIE.h

index 1a1c080c32c155d26ec4cee987d938dab7217b11..ef05f1707810d95d85f1d1f2efafc3268ee73950 100644 (file)
@@ -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;