Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
ChuanqiXu9 committed Jun 18, 2024
1 parent 50923aa commit 17e0c8d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions clang/include/clang/AST/DeclID.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#define LLVM_CLANG_AST_DECLID_H

#include "llvm/ADT/DenseMapInfo.h"
#include "llvm/ADT/Hashing.h"
#include "llvm/ADT/iterator.h"

#include <climits>
Expand Down Expand Up @@ -233,8 +234,8 @@ template <> struct DenseMapInfo<clang::GlobalDeclID> {
// Our default hash algorithm for 64 bits integer may not be very good.
// In GlobalDeclID's case, it is pretty common that the lower 32 bits can
// be same.
return DenseMapInfo<uint32_t>::getHashValue(Key.getModuleFileIndex()) ^
DenseMapInfo<uint32_t>::getHashValue(Key.getLocalDeclIndex());
// FIXME: Remove this when we fix the underlying issue.
return llvm::hash_value(Key.get());
}

static bool isEqual(const GlobalDeclID &L, const GlobalDeclID &R) {
Expand Down

0 comments on commit 17e0c8d

Please sign in to comment.