[ODRHash] Do not rely on Type* when computing the hash.
authorVassil Vassilev <v.g.vassilev@gmail.com>
Thu, 28 Jun 2018 13:28:44 +0000 (13:28 +0000)
committerVassil Vassilev <v.g.vassilev@gmail.com>
Thu, 28 Jun 2018 13:28:44 +0000 (13:28 +0000)
commit61914d38dd5a0f1866d911a408d5070089379213
treeef48559bea92a07840e0f65646a32f96d4c6c3ae
parent63feb1662785b23929d3a8a1a50e3f414466b4ec
[ODRHash] Do not rely on Type* when computing the hash.

ODRHash aims to provide Cross-TU stable hashing. Making clang::Type pointer
part of the hash connects (remotely) the ODRHash with the TU-specific
::Profile hasher.

r332281 exposed the issue by changing the way the ASTContext different
elaborated types if there is an owning tag. In that case, ODRHash stores two
 different types in its TypeMap which yields false ODR violation in modules.

The current state of implementation shouldn't need the TypeMap concept
anymore. Rip it out.

Differential Revision: https://reviews.llvm.org/D48524

llvm-svn: 335853
clang/include/clang/AST/ODRHash.h
clang/lib/AST/ODRHash.cpp
clang/test/Modules/Inputs/odr_hash-elaborated-types/first.h [new file with mode: 0644]
clang/test/Modules/Inputs/odr_hash-elaborated-types/module.modulemap [new file with mode: 0644]
clang/test/Modules/Inputs/odr_hash-elaborated-types/second.h [new file with mode: 0644]
clang/test/Modules/Inputs/odr_hash-elaborated-types/textual_stat.h [new file with mode: 0644]
clang/test/Modules/Inputs/odr_hash-elaborated-types/textual_time.h [new file with mode: 0644]
clang/test/Modules/odr_hash-elaborated-types.cpp [new file with mode: 0644]