diff options
author | Yaron Keren <yaron.keren@gmail.com> | 2014-05-24 07:19:25 +0000 |
---|---|---|
committer | Yaron Keren <yaron.keren@gmail.com> | 2014-05-24 07:19:25 +0000 |
commit | 188cafb03057fe6bfe5809b61782407d22995ca5 (patch) | |
tree | 100315c90a3db0b8d30dce84535bc303f1af412f | |
parent | e471e434842fcb7a7c0862f14745e195101f8640 (diff) | |
download | bcm5719-llvm-188cafb03057fe6bfe5809b61782407d22995ca5.tar.gz bcm5719-llvm-188cafb03057fe6bfe5809b61782407d22995ca5.zip |
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
-rw-r--r-- | clang/lib/AST/RecordLayout.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/AST/RecordLayout.cpp b/clang/lib/AST/RecordLayout.cpp index 38e28d44d0f..b2c244e3790 100644 --- a/clang/lib/AST/RecordLayout.cpp +++ b/clang/lib/AST/RecordLayout.cpp @@ -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); |