aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2009-08-17 19:04:50 +0000
committerFariborz Jahanian <fjahanian@apple.com>2009-08-17 19:04:50 +0000
commit0880bacf8fdb7de9d9c5b53b81ea0e53afccafb5 (patch)
tree53c2515821b23f598d2d000a436f2e1c9eced0b2 /lib/CodeGen/CodeGenFunction.cpp
parent622f9dc76bdc4f4d6920907f4fb64a3222aa6566 (diff)
Patch to 1) synthesizing non-trivial default destructor when
one is not provided by user. 2) More complete emission of ctor prologue when it has no initializer list or when it is synthesized. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79269 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r--lib/CodeGen/CodeGenFunction.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp
index 1e8d05261d..d0c722ecfb 100644
--- a/lib/CodeGen/CodeGenFunction.cpp
+++ b/lib/CodeGen/CodeGenFunction.cpp
@@ -254,6 +254,8 @@ void CodeGenFunction::GenerateCode(const FunctionDecl *FD,
SynthesizeDefaultConstructor(CD, FD, Fn, Args);
}
}
+ else if (const CXXDestructorDecl *DD = dyn_cast<CXXDestructorDecl>(FD))
+ SynthesizeDefaultDestructor(DD, FD, Fn, Args);
else if (const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(FD))
if (MD->isCopyAssignment())
SynthesizeCXXCopyAssignment(MD, FD, Fn, Args);