[ODRHash] Merge the two function hashes into one.
authorRichard Trieu <rtrieu@google.com>
Tue, 10 Jul 2018 01:40:50 +0000 (01:40 +0000)
committerRichard Trieu <rtrieu@google.com>
Tue, 10 Jul 2018 01:40:50 +0000 (01:40 +0000)
commit27c1b1a638d2f6300ebc6f64fd97bd6f4d9c9e2d
tree3b7724f9d051c9ec64ba4b74476f5d13df9ee69e
parent2a3036fb1d92747ddaeba88182227c6e726b6d0e
[ODRHash] Merge the two function hashes into one.

Functions that are a sub-Decl of a record were hashed differently than other
functions.  This change keeps the AddFunctionDecl function and the hash of
records now calls this function.  In addition, AddFunctionDecl has an option
to perform a hash as if the body was absent, which is required for some
checks after loading modules.  Additional logic prevents multiple error
message from being printed.

llvm-svn: 336632
clang/include/clang/AST/Decl.h
clang/include/clang/AST/ODRHash.h
clang/include/clang/Basic/DiagnosticSerializationKinds.td
clang/lib/AST/Decl.cpp
clang/lib/AST/ODRHash.cpp
clang/lib/Serialization/ASTReader.cpp
clang/test/Modules/odr_hash.cpp