From 423f46f2d8e38f1556daee467d8a4e3aefd28beb Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Wed, 20 Jul 2016 21:38:26 +0000 Subject: [PATCH] Fix memory leak introduced in r276159. llvm-svn: 276188 --- clang/lib/AST/ASTContext.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index fadcda0c4b00..cf7f5947a2f2 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -787,6 +787,9 @@ ASTContext::~ASTContext() { MaterializedTemporaryValues) MTVPair.second->~APValue(); + for (const auto &Value : ModuleInitializers) + Value.second->~PerModuleInitializers(); + llvm::DeleteContainerSeconds(MangleNumberingContexts); }