[StructuralHash][NFC] Use anonymous namespace
authorArthur Eubanks <aeubanks@google.com>
Tue, 14 Mar 2023 17:48:10 +0000 (10:48 -0700)
committerArthur Eubanks <aeubanks@google.com>
Tue, 14 Mar 2023 17:48:34 +0000 (10:48 -0700)
llvm/lib/IR/StructuralHash.cpp

index b6b9fe72cc355b40582ab6900d25a4da4cb550fb..0a3c95bdc0884e33a275b6b21d75b4e278800526 100644 (file)
 
 using namespace llvm;
 
-namespace details {
+namespace {
 
 // Basic hashing mechanism to detect structural change to the IR, used to verify
 // pass return status consistency with actual change. Loosely copied from
 // llvm/lib/Transforms/Utils/FunctionComparator.cpp
 
-class StructuralHash {
+class StructuralHashImpl {
   uint64_t Hash = 0x6acaa36bef8325c5ULL;
 
   void update(uint64_t V) { Hash = hashing::detail::hash_16_bytes(Hash, V); }
 
 public:
-  StructuralHash() = default;
+  StructuralHashImpl() = default;
 
   void update(const Function &F) {
     if (F.empty())
@@ -64,16 +64,16 @@ public:
   uint64_t getHash() const { return Hash; }
 };
 
-} // namespace details
+} // namespace
 
 uint64_t llvm::StructuralHash(const Function &F) {
-  ::details::StructuralHash H;
+  StructuralHashImpl H;
   H.update(F);
   return H.getHash();
 }
 
 uint64_t llvm::StructuralHash(const Module &M) {
-  ::details::StructuralHash H;
+  StructuralHashImpl H;
   H.update(M);
   return H.getHash();
 }