File indexing completed on 2026-05-10 08:43:42
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef LLVM_DEBUGINFO_GSYM_FILEENTRY_H
0010 #define LLVM_DEBUGINFO_GSYM_FILEENTRY_H
0011
0012 #include "llvm/ADT/DenseMapInfo.h"
0013 #include "llvm/ADT/Hashing.h"
0014 #include <functional>
0015 #include <stdint.h>
0016
0017 namespace llvm {
0018 namespace gsym {
0019
0020
0021
0022
0023
0024 struct FileEntry {
0025
0026
0027
0028 uint32_t Dir = 0;
0029 uint32_t Base = 0;
0030
0031
0032 FileEntry() = default;
0033 FileEntry(uint32_t D, uint32_t B) : Dir(D), Base(B) {}
0034
0035
0036
0037 bool operator==(const FileEntry &RHS) const {
0038 return Base == RHS.Base && Dir == RHS.Dir;
0039 };
0040 bool operator!=(const FileEntry &RHS) const {
0041 return Base != RHS.Base || Dir != RHS.Dir;
0042 };
0043 };
0044
0045 }
0046
0047 template <> struct DenseMapInfo<gsym::FileEntry> {
0048 static inline gsym::FileEntry getEmptyKey() {
0049 uint32_t key = DenseMapInfo<uint32_t>::getEmptyKey();
0050 return gsym::FileEntry(key, key);
0051 }
0052 static inline gsym::FileEntry getTombstoneKey() {
0053 uint32_t key = DenseMapInfo<uint32_t>::getTombstoneKey();
0054 return gsym::FileEntry(key, key);
0055 }
0056 static unsigned getHashValue(const gsym::FileEntry &Val) {
0057 return llvm::hash_combine(DenseMapInfo<uint32_t>::getHashValue(Val.Dir),
0058 DenseMapInfo<uint32_t>::getHashValue(Val.Base));
0059 }
0060 static bool isEqual(const gsym::FileEntry &LHS, const gsym::FileEntry &RHS) {
0061 return LHS == RHS;
0062 }
0063 };
0064
0065 }
0066 #endif