summaryrefslogtreecommitdiffstats
path: root/lib/AST/RecordLayout.cpp
diff options
context:
space:
mode:
authorYaron Keren <yaron.keren@gmail.com>2014-05-24 07:19:25 +0000
committerYaron Keren <yaron.keren@gmail.com>2014-05-24 07:19:25 +0000
commit7302a74fb4e753ee1c1b5fefb8f61b90a3cf0d9a (patch)
treef232ee0d64763f2fe2dd0466f9406b9a9577d7dd /lib/AST/RecordLayout.cpp
parentda3cc83afeffc4ca616d6227d0b792a1b1d389c3 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209567 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/RecordLayout.cpp')
-rw-r--r--lib/AST/RecordLayout.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/AST/RecordLayout.cpp b/lib/AST/RecordLayout.cpp
index 38e28d44d0..b2c244e379 100644
--- a/lib/AST/RecordLayout.cpp
+++ b/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);