diff --git a/llvm/include/llvm/ADT/DenseMapInfo.h b/llvm/include/llvm/ADT/DenseMapInfo.h --- a/llvm/include/llvm/ADT/DenseMapInfo.h +++ b/llvm/include/llvm/ADT/DenseMapInfo.h @@ -13,7 +13,6 @@ #ifndef LLVM_ADT_DENSEMAPINFO_H #define LLVM_ADT_DENSEMAPINFO_H -#include "llvm/ADT/Hashing.h" #include #include #include @@ -283,13 +282,6 @@ } }; -template <> struct DenseMapInfo { - static inline hash_code getEmptyKey() { return hash_code(-1); } - static inline hash_code getTombstoneKey() { return hash_code(-2); } - static unsigned getHashValue(hash_code val) { return val; } - static bool isEqual(hash_code LHS, hash_code RHS) { return LHS == RHS; } -}; - } // end namespace llvm #endif // LLVM_ADT_DENSEMAPINFO_H diff --git a/llvm/include/llvm/ADT/Hashing.h b/llvm/include/llvm/ADT/Hashing.h --- a/llvm/include/llvm/ADT/Hashing.h +++ b/llvm/include/llvm/ADT/Hashing.h @@ -56,6 +56,7 @@ #include namespace llvm { +template struct DenseMapInfo; /// An opaque object representing a hash code. /// @@ -677,6 +678,13 @@ return hash_combine_range(arg.begin(), arg.end()); } +template <> struct DenseMapInfo { + static inline hash_code getEmptyKey() { return hash_code(-1); } + static inline hash_code getTombstoneKey() { return hash_code(-2); } + static unsigned getHashValue(hash_code val) { return val; } + static bool isEqual(hash_code LHS, hash_code RHS) { return LHS == RHS; } +}; + } // namespace llvm #endif