From: Benjamin Kramer Date: Sun, 20 Aug 2017 13:02:57 +0000 (+0000) Subject: [ODRHash] Move into anonymous namespace. NFC. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0366408204172d476c3e10712e2d298ff69c72b5;p=clang [ODRHash] Move into anonymous namespace. NFC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@311286 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/ODRHash.cpp b/lib/AST/ODRHash.cpp index 121724a731..c968a55adf 100644 --- a/lib/AST/ODRHash.cpp +++ b/lib/AST/ODRHash.cpp @@ -199,6 +199,7 @@ unsigned ODRHash::CalculateHash() { return ID.ComputeHash(); } +namespace { // Process a Decl pointer. Add* methods call back into ODRHash while Visit* // methods process the relevant parts of the Decl. class ODRDeclVisitor : public ConstDeclVisitor { @@ -343,6 +344,7 @@ public: } } }; +} // namespace // Only allow a small portion of Decl's to be processed. Remove this once // all Decl's can be handled. @@ -420,6 +422,7 @@ void ODRHash::AddDecl(const Decl *D) { } } +namespace { // Process a Type pointer. Add* methods call back into ODRHash while Visit* // methods process the relevant parts of the Type. class ODRTypeVisitor : public TypeVisitor { @@ -608,6 +611,7 @@ public: AddDecl(T->getDecl()); } }; +} // namespace void ODRHash::AddType(const Type *T) { assert(T && "Expecting non-null pointer.");