summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-07-02 20:37:36 +0000
committerDouglas Gregor <dgregor@apple.com>2010-07-02 20:37:36 +0000
commit7454c563f192c75fa31c123af50e15eb32000423 (patch)
treecb6a0b13191c7de2f54608877f3f0114c9d223d7 /clang/lib/AST
parent0ce84486c382b9377ebeb993b0c262a70c72350a (diff)
downloadbcm5719-llvm-7454c563f192c75fa31c123af50e15eb32000423.tar.gz
bcm5719-llvm-7454c563f192c75fa31c123af50e15eb32000423.zip
Lazily declare the implicitly-declared destructor in a C++ class.
llvm-svn: 107510
Diffstat (limited to 'clang/lib/AST')
-rw-r--r--clang/lib/AST/ASTContext.cpp7
-rw-r--r--clang/lib/AST/DeclCXX.cpp1
2 files changed, 8 insertions, 0 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index ca83964b3ec..40342b36ba6 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -31,6 +31,9 @@
using namespace clang;
+unsigned ASTContext::NumImplicitDestructors;
+unsigned ASTContext::NumImplicitDestructorsDeclared;
+
enum FloatingRank {
FloatRank, DoubleRank, LongDoubleRank
};
@@ -253,6 +256,10 @@ void ASTContext::PrintStats() const {
fprintf(stderr, "Total bytes = %d\n", int(TotalBytes));
+ // Implicit special member functions.
+ fprintf(stderr, " %u/%u implicit destructors created\n",
+ NumImplicitDestructorsDeclared, NumImplicitDestructors);
+
if (ExternalSource.get()) {
fprintf(stderr, "\n");
ExternalSource->PrintStats();
diff --git a/clang/lib/AST/DeclCXX.cpp b/clang/lib/AST/DeclCXX.cpp
index a77c1c8ed52..05e3680ea94 100644
--- a/clang/lib/AST/DeclCXX.cpp
+++ b/clang/lib/AST/DeclCXX.cpp
@@ -32,6 +32,7 @@ CXXRecordDecl::DefinitionData::DefinitionData(CXXRecordDecl *D)
Abstract(false), HasTrivialConstructor(true),
HasTrivialCopyConstructor(true), HasTrivialCopyAssignment(true),
HasTrivialDestructor(true), ComputedVisibleConversions(false),
+ DeclaredDestructor(false),
Bases(0), NumBases(0), VBases(0), NumVBases(0),
Definition(D), FirstFriend(0) {
}
OpenPOWER on IntegriCloud