File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed
lib/AST/RequirementMachine Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -671,6 +671,16 @@ RequirementMachine *RewriteContext::getRequirementMachine(
671671// / We print stats in the destructor, which should get executed at the end of
672672// / a compilation job.
673673RewriteContext::~RewriteContext () {
674+ for (const auto &pair : Machines)
675+ delete pair.second ;
676+
677+ Machines.clear ();
678+
679+ for (const auto &pair : Components)
680+ delete pair.second .Machine ;
681+
682+ Components.clear ();
683+
674684 if (Context.LangOpts .AnalyzeRequirementMachine ) {
675685 llvm::dbgs () << " --- Requirement Machine Statistics ---\n " ;
676686 llvm::dbgs () << " \n * Symbol kind:\n " ;
@@ -690,14 +700,4 @@ RewriteContext::~RewriteContext() {
690700 llvm::dbgs () << " \n * Generating conformance equations:\n " ;
691701 GeneratingConformancesHistogram.dump (llvm::dbgs ());
692702 }
693-
694- for (const auto &pair : Machines)
695- delete pair.second ;
696-
697- Machines.clear ();
698-
699- for (const auto &pair : Components)
700- delete pair.second .Machine ;
701-
702- Components.clear ();
703703}
You can’t perform that action at this time.
0 commit comments