File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 13
13
#ifndef LLVM_CLANG_AST_INTERP_RECORD_H
14
14
#define LLVM_CLANG_AST_INTERP_RECORD_H
15
15
16
- #include " clang/AST/Decl.h"
17
16
#include " Descriptor.h"
17
+ #include " clang/AST/Decl.h"
18
+ #include " clang/AST/DeclCXX.h"
18
19
19
20
namespace clang {
20
21
namespace interp {
@@ -62,6 +63,12 @@ class Record final {
62
63
const Base *getBase (const RecordDecl *FD) const ;
63
64
// / Returns a virtual base descriptor.
64
65
const Base *getVirtualBase (const RecordDecl *RD) const ;
66
+ // Returns the destructor of the record, if any.
67
+ const CXXDestructorDecl *getDestructor () const {
68
+ if (const auto *CXXDecl = dyn_cast<CXXRecordDecl>(Decl))
69
+ return CXXDecl->getDestructor ();
70
+ return nullptr ;
71
+ }
65
72
66
73
using const_field_iter = FieldList::const_iterator;
67
74
llvm::iterator_range<const_field_iter> fields () const {
You can’t perform that action at this time.
0 commit comments