]> granicus.if.org Git - clang/commit
[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)
commit29cdecbf6913d7ddbe26d55e029d96094ae1b0b3
treece7b2b3d108b5e9349807f8c6fe3240277566f05
parentbff556fe3c9d9e8a530ef819fe034ad5ec69ce55
[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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@335853 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/ODRHash.h
lib/AST/ODRHash.cpp
test/Modules/Inputs/odr_hash-elaborated-types/first.h [new file with mode: 0644]
test/Modules/Inputs/odr_hash-elaborated-types/module.modulemap [new file with mode: 0644]
test/Modules/Inputs/odr_hash-elaborated-types/second.h [new file with mode: 0644]
test/Modules/Inputs/odr_hash-elaborated-types/textual_stat.h [new file with mode: 0644]
test/Modules/Inputs/odr_hash-elaborated-types/textual_time.h [new file with mode: 0644]
test/Modules/odr_hash-elaborated-types.cpp [new file with mode: 0644]