From f9b06eb99eda8c1c0f3cced9d341c51af0b1aed1 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Mon, 28 Apr 2014 22:41:39 +0000 Subject: [PATCH] DIE: Document some learnings about why the world isn't perfect. llvm-svn: 207458 --- lib/CodeGen/AsmPrinter/DIE.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/CodeGen/AsmPrinter/DIE.h b/lib/CodeGen/AsmPrinter/DIE.h index 1a1c080c32c..ef05f170781 100644 --- a/lib/CodeGen/AsmPrinter/DIE.h +++ b/lib/CodeGen/AsmPrinter/DIE.h @@ -124,6 +124,12 @@ protected: /// Children DIEs. /// + // This can't be a vector because pointer validity is requirent for the + // Parent pointer and DIEEntry. + // It can't be a list 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> Children; DIE *Parent;