CXXInfo memory should be released after calling the destructor

instead of before. The wrong order had no effect since Deallocate() 
does nothing right now, but we may replace allocator in the future.

llvm-svn: 209567
This commit is contained in:
Yaron Keren 2014-05-24 07:19:25 +00:00
parent e471e43484
commit 188cafb030
1 changed files with 1 additions and 1 deletions

View File

@ -21,8 +21,8 @@ void ASTRecordLayout::Destroy(ASTContext &Ctx) {
if (FieldOffsets)
Ctx.Deallocate(FieldOffsets);
if (CXXInfo) {
Ctx.Deallocate(CXXInfo);
CXXInfo->~CXXRecordLayoutInfo();
Ctx.Deallocate(CXXInfo);
}
this->~ASTRecordLayout();
Ctx.Deallocate(this);