Patch D147740 Change back to std::unordered_map for SampleProfileMap because it has reference validity, the change to use llvm::DenseMap is moved to a different patch.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/include/llvm/ADT/Hashing.h | ||
---|---|---|
687–688 | This can be problematic, if llvm::hash_code is being used in std::unordered_map somewhere else and the user defines std::hash<llvm::hash_code> locally, it will cause multiple definition of a class if the header somehow get included. |
Given this is only used by HashKeyMap and not really meant to enable general conversion from llvm hash to std hash, consider move it to SampleProf.h right above SampleProfileMap.