forked from OSchip/llvm-project
[ODRHash] Canonicalize Decl's before processing.
Canonicalizing the Decl before processing it as part of the hash should reduce issues with non-canonical types showing up as mismatches. llvm-svn: 321319
This commit is contained in:
parent
e9d8789de3
commit
f72fb7e989
|
@ -468,6 +468,7 @@ void ODRHash::AddCXXRecordDecl(const CXXRecordDecl *Record) {
|
|||
|
||||
void ODRHash::AddDecl(const Decl *D) {
|
||||
assert(D && "Expecting non-null pointer.");
|
||||
D = D->getCanonicalDecl();
|
||||
auto Result = DeclMap.insert(std::make_pair(D, DeclMap.size()));
|
||||
ID.AddInteger(Result.first->second);
|
||||
// On first encounter of a Decl pointer, process it. Every time afterwards,
|
||||
|
|
Loading…
Reference in New Issue