diff --git a/lib/TableGen/Record.cpp b/lib/TableGen/Record.cpp index c17aea99f8e..c553a21c261 100644 --- a/lib/TableGen/Record.cpp +++ b/lib/TableGen/Record.cpp @@ -623,9 +623,8 @@ static void ProfileListInit(FoldingSetNodeID &ID, ListInit *ListInit::get(ArrayRef Range, RecTy *EltTy) { typedef FoldingSet Pool; static Pool ThePool; + static std::vector> TheActualPool; - // Just use the FoldingSetNodeID to compute a hash. Use a DenseMap - // for actual storage. FoldingSetNodeID ID; ProfileListInit(ID, Range, EltTy); @@ -635,6 +634,7 @@ ListInit *ListInit::get(ArrayRef Range, RecTy *EltTy) { ListInit *I = new ListInit(Range, EltTy); ThePool.InsertNode(I, IP); + TheActualPool.push_back(std::unique_ptr(I)); return I; }