Index: llvm/trunk/include/llvm/IR/CallSite.h =================================================================== --- llvm/trunk/include/llvm/IR/CallSite.h +++ llvm/trunk/include/llvm/IR/CallSite.h @@ -623,9 +623,31 @@ } private: + friend struct DenseMapInfo; User::op_iterator getCallee() const; }; +template <> struct DenseMapInfo { + using BaseInfo = llvm::DenseMapInfo; + + static CallSite getEmptyKey() { + CallSite CS; + CS.I = BaseInfo::getEmptyKey(); + return CS; + } + static CallSite getTombstoneKey() { + CallSite CS; + CS.I = BaseInfo::getTombstoneKey(); + return CS; + } + static unsigned getHashValue(const CallSite &CS) { + return BaseInfo::getHashValue(CS.I); + } + static bool isEqual(const CallSite &LHS, const CallSite &RHS) { + return LHS == RHS; + } +}; + /// ImmutableCallSite - establish a view to a call site for examination class ImmutableCallSite : public CallSiteBase<> { public: