PrevLabel(NULL), GlobalCUIndexCount(0),
InfoHolder(A, &AbbreviationsSet, &Abbreviations, "info_string",
DIEValueAllocator),
- SkeletonCU(0),
SkeletonAbbrevSet(InitAbbreviationsSetSize),
SkeletonHolder(A, &SkeletonAbbrevSet, &SkeletonAbbrevs, "skel_string",
DIEValueAllocator) {
E = CUMap.end(); I != E; ++I)
delete I->second;
- delete SkeletonCU;
+ for (SmallVector<CompileUnit *, 1>::iterator I = SkeletonCUs.begin(),
+ E = SkeletonCUs.end(); I != E; ++I)
+ delete *I;
// Reset these for the next Module if we have one.
FirstCU = NULL;
- SkeletonCU = NULL;
}
// Find abstract variable, if any, associated with Var.
if (!CompilationDir.empty())
NewCU->addLocalString(Die, dwarf::DW_AT_comp_dir, CompilationDir);
- if (!SkeletonCU)
- SkeletonCU = NewCU;
-
SkeletonHolder.addUnit(NewCU);
+ SkeletonCUs.push_back(NewCU);
return NewCU;
}
// original object file, rather than things that are meant
// to be in the .dwo sections.
- // The CU left in the original object file for separated debug info.
- CompileUnit *SkeletonCU;
+ // The CUs left in the original object file for separated debug info.
+ SmallVector<CompileUnit *, 1> SkeletonCUs;
// Used to uniquely define abbreviations for the skeleton emission.
FoldingSet<DIEAbbrev> SkeletonAbbrevSet;