summaryrefslogtreecommitdiffstats
path: root/clang/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
commitd172e91f2ada3ad24f889a278d48bc36346ba972 (patch)
treea9162ba53665e0c71db32dca5c542f47b6cff5c8 /clang/lib/CodeGen/CodeGenFunction.cpp
parent436bd9f7708304dac6e7091765c2f6d2eb3c1fcc (diff)
downloadbcm5719-llvm-d172e91f2ada3ad24f889a278d48bc36346ba972.tar.gz
bcm5719-llvm-d172e91f2ada3ad24f889a278d48bc36346ba972.zip
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. llvm-svn: 79269
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp
index 1e8d05261db..d0c722ecfb2 100644
--- a/clang/lib/CodeGen/CodeGenFunction.cpp
+++ b/clang/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);
OpenPOWER on IntegriCloud