diff options
author | Richard Trieu <rtrieu@google.com> | 2017-02-18 02:09:28 +0000 |
---|---|---|
committer | Richard Trieu <rtrieu@google.com> | 2017-02-18 02:09:28 +0000 |
commit | 182eb8f62d1fdb0c9620af8e5a3d40b60baff409 (patch) | |
tree | 376e44841dff11c9ee7647ef596e0eacc50f0354 /include/clang/AST/DeclCXX.h | |
parent | 8c54694edaac34acb4d615faf94dff8f895ffddc (diff) |
Part of adding an improved ODR checker.
Reserve a spot for ODR hash in CXXRecordDecl and in its modules storage.
Default the hash value to 0 for all classes.
Differential Revision: https://reviews.llvm.org/D21675
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@295533 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/AST/DeclCXX.h')
-rw-r--r-- | include/clang/AST/DeclCXX.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/clang/AST/DeclCXX.h b/include/clang/AST/DeclCXX.h index 7267afdc7f..d321d19068 100644 --- a/include/clang/AST/DeclCXX.h +++ b/include/clang/AST/DeclCXX.h @@ -458,6 +458,9 @@ class CXXRecordDecl : public RecordDecl { /// \brief Whether we are currently parsing base specifiers. unsigned IsParsingBaseSpecifiers : 1; + /// \brief A hash of parts of the class to help in ODR checking. + unsigned ODRHash; + /// \brief The number of base class specifiers in Bases. unsigned NumBases; @@ -703,6 +706,9 @@ public: return data().IsParsingBaseSpecifiers; } + void computeODRHash(); + unsigned getODRHash() const { return data().ODRHash; } + /// \brief Sets the base classes of this struct or class. void setBases(CXXBaseSpecifier const * const *Bases, unsigned NumBases); |