summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ODRHash.cpp
diff options
context:
space:
mode:
authorRichard Trieu <rtrieu@google.com>2017-09-30 02:19:17 +0000
committerRichard Trieu <rtrieu@google.com>2017-09-30 02:19:17 +0000
commite13eabe7d33956d1d9d72314e4044db904d56728 (patch)
tree22e2bcd053aad84898481c053012eadf3f6a3b77 /clang/lib/AST/ODRHash.cpp
parent305ee8e5f852e2658ea24bafc7f78fe569de7956 (diff)
[ODRHash] Add base classes to hashing CXXRecordDecl.
llvm-svn: 314581
Diffstat (limited to 'clang/lib/AST/ODRHash.cpp')
-rw-r--r--clang/lib/AST/ODRHash.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/lib/AST/ODRHash.cpp b/clang/lib/AST/ODRHash.cpp
index fb8eade3c08e..17c95f2a0af7 100644
--- a/clang/lib/AST/ODRHash.cpp
+++ b/clang/lib/AST/ODRHash.cpp
@@ -456,6 +456,14 @@ void ODRHash::AddCXXRecordDecl(const CXXRecordDecl *Record) {
if (TD) {
AddTemplateParameterList(TD->getTemplateParameters());
}
+
+ ID.AddInteger(Record->getNumBases());
+ auto Bases = Record->bases();
+ for (auto Base : Bases) {
+ AddQualType(Base.getType());
+ ID.AddInteger(Base.isVirtual());
+ ID.AddInteger(Base.getAccessSpecifierAsWritten());
+ }
}
void ODRHash::AddDecl(const Decl *D) {