diff options
author | Anders Carlsson <andersca@mac.com> | 2011-05-14 23:26:09 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2011-05-14 23:26:09 +0000 |
commit | ffb945ffb5d29b80fd93649c3572b6d87abce3fc (patch) | |
tree | b2f9cf40b3b751972661f2b3763cbabc636c7fb0 /include/clang/AST/Decl.h | |
parent | a83c17c28f4a570e18678f6031834487534f120d (diff) |
When emitting the destructor for a class with a vtable, if we can determine
that the destructor body is trivial and that all member variables also have either
trivial destructors or trivial destructor bodies, we don't need to initialize the
vtable pointers since no virtual member functions will be called on the destructor.
Fixes PR9181.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131368 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/AST/Decl.h')
-rw-r--r-- | include/clang/AST/Decl.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/clang/AST/Decl.h b/include/clang/AST/Decl.h index 193c3286f8..6ca14ce874 100644 --- a/include/clang/AST/Decl.h +++ b/include/clang/AST/Decl.h @@ -1515,6 +1515,10 @@ public: return hasBody(Definition); } + /// hasTrivialBody - Returns whether the function has a trivial body that does + /// not require any specific codegen. + bool hasTrivialBody() const; + /// isDefined - Returns true if the function is defined at all, including /// a deleted definition. Except for the behavior when the function is /// deleted, behaves like hasBody. |