9#ifndef LLVM_TEXTAPI_SYMBOLSET_H
10#define LLVM_TEXTAPI_SYMBOLSET_H
47 return std::tie(
LHS.Kind,
LHS.Name) == std::tie(
RHS.Kind,
RHS.Name);
51template <
typename DerivedT,
typename KeyInfoT,
typename BucketT>
53 KeyInfoT, BucketT> &
LHS,
55 KeyInfoT, BucketT> &
RHS) {
56 if (
LHS.size() !=
RHS.size())
58 for (
const auto &KV :
LHS) {
59 auto I =
RHS.find(KV.first);
60 if (
I ==
RHS.end() || *
I->second != *KV.second)
66template <
typename DerivedT,
typename KeyInfoT,
typename BucketT>
68 KeyInfoT, BucketT> &
LHS,
70 KeyInfoT, BucketT> &
RHS) {
96 size_t size()
const {
return Symbols.size(); }
98 template <
typename RangeT,
typename ElT = std::remove_reference_t<
99 decltype(*std::begin(std::declval<RangeT>()))>>
102 auto *
Global = addGlobalImpl(Kind,
Name, Flags);
103 for (
const auto &Targ : Targets)
121 template <
typename U>
139 return {Symbols.begin(), Symbols.end()};
148 make_range<const_symbol_iterator>({Symbols.begin()}, {Symbols.end()}),
158 make_range<const_symbol_iterator>({Symbols.begin()}, {Symbols.end()}),
168 make_range<const_symbol_iterator>({Symbols.begin()}, {Symbols.end()}),
This file defines the BumpPtrAllocator interface.
This file defines the DenseMap class.
Allocate memory in an ever growing pool, as if by bump-pointer.
DenseMapIterator< KeyT, ValueT, KeyInfoT, BucketT, true > const_iterator
Symbol * addGlobal(EncodeKind Kind, StringRef Name, SymbolFlags Flags, RangeT &&Targets)
bool operator!=(const SymbolSet &O) const
void * allocate(size_t Size, unsigned Align=8)
Symbol * addGlobal(EncodeKind Kind, StringRef Name, SymbolFlags Flags, const Target &Targ)
const Symbol * findSymbol(EncodeKind Kind, StringRef Name, ObjCIFSymbolKind ObjCIF=ObjCIFSymbolKind::None) const
const_filtered_symbol_range undefineds() const
const_symbol_range symbols() const
bool operator==(const SymbolSet &O) const
const_filtered_symbol_range reexports() const
const_filtered_symbol_range exports() const
bool isReexported() const
StringRef - Represent a constant reference to a string, i.e.
Specialization of filter_iterator_base for forward iteration only.
CRTP base class for adapting an iterator to a different type.
A range adaptor for a pair of iterators.
This provides a very simple, boring adaptor for a begin and end iterator into a range type.
ObjCIFSymbolKind
ObjC Interface symbol mappings.
EncodeKind
Mapping of entry types in TextStubs.
@ ObjectiveCInstanceVariable
This is an optimization pass for GlobalISel generic memory operations.
hash_code hash_value(const FixedPointSemantics &Val)
bool operator!=(uint64_t V1, const APInt &V2)
bool operator==(const AddressRangeValuePair &LHS, const AddressRangeValuePair &RHS)
iterator_range< filter_iterator< detail::IterOfRange< RangeT >, PredicateT > > make_filter_range(RangeT &&Range, PredicateT Pred)
Convenience function that takes a range of elements and a predicate, and return a new filter_iterator...
@ Global
Append to llvm.global_dtors.
hash_code hash_combine(const Ts &...args)
Combine values into a single hash_code.
Implement std::hash so that hash_code can be used in STL containers.
This struct is a compact representation of a valid (non-zero power of two) alignment.
static SymbolsMapKey getEmptyKey()
static SymbolsMapKey getTombstoneKey()
static bool isEqual(const SymbolsMapKey &LHS, const SymbolsMapKey &RHS)
static unsigned getHashValue(const SymbolsMapKey &Key)
An information struct used to provide DenseMap with the various necessary components for a given valu...
pointer operator->() const
const_symbol_iterator(U &&u)
const_symbol_iterator()=default
reference operator*() const
SymbolsMapKey(MachO::EncodeKind Kind, StringRef Name)