a std::vector that allocates on the heap. As a consequence, we have to
run all of their destructors when tearing down the set, not just
deallocate the memory blobs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207902
91177308-0d34-0410-b5e6-
96231b3b80d8
struct FilesMade : public llvm::FoldingSet<PDFileEntry> {
llvm::BumpPtrAllocator Alloc;
-
+
+ ~FilesMade();
+
void addDiagnostic(const PathDiagnostic &PD,
StringRef ConsumerName,
StringRef fileName);
Diags.clear();
}
+PathDiagnosticConsumer::FilesMade::~FilesMade() {
+ for (PDFileEntry &Entry : *this)
+ Entry.~PDFileEntry();
+}
+
void PathDiagnosticConsumer::FilesMade::addDiagnostic(const PathDiagnostic &PD,
StringRef ConsumerName,
StringRef FileName) {