Lines Matching defs:ImportKey
103 template <typename T> struct ImportKey {
114 ImportKey(T type) : type(type), state(State::Plain) {}
115 ImportKey(T type, State state) : type(type), state(state) {}
116 ImportKey(T type, std::optional<StringRef> importModule,
123 inline bool operator==(const ImportKey<T> &lhs, const ImportKey<T> &rhs) {
130 // `ImportKey<T>` can be used as a key in a `DenseMap` if `T` can be used as a
133 template <typename T> struct DenseMapInfo<lld::wasm::ImportKey<T>> {
134 static lld::wasm::ImportKey<T> getEmptyKey() {
135 typename lld::wasm::ImportKey<T> key(llvm::DenseMapInfo<T>::getEmptyKey());
136 key.state = lld::wasm::ImportKey<T>::State::Empty;
139 static lld::wasm::ImportKey<T> getTombstoneKey() {
140 typename lld::wasm::ImportKey<T> key(llvm::DenseMapInfo<T>::getEmptyKey());
141 key.state = lld::wasm::ImportKey<T>::State::Tombstone;
144 static unsigned getHashValue(const lld::wasm::ImportKey<T> &key) {
151 static bool isEqual(const lld::wasm::ImportKey<T> &lhs,
152 const lld::wasm::ImportKey<T> &rhs) {
196 llvm::DenseMap<ImportKey<WasmGlobalType>, uint32_t> importedGlobals;
197 llvm::DenseMap<ImportKey<WasmSignature>, uint32_t> importedFunctions;
198 llvm::DenseMap<ImportKey<WasmTableType>, uint32_t> importedTables;
199 llvm::DenseMap<ImportKey<WasmSignature>, uint32_t> importedTags;