9#ifndef LLVM_TEXTAPI_SYMBOLSET_H
10#define LLVM_TEXTAPI_SYMBOLSET_H
48 return std::tie(
LHS.Kind,
LHS.Name) == std::tie(
RHS.Kind,
RHS.Name);
52template <
typename DerivedT,
typename KeyInfoT,
typename BucketT>
54 KeyInfoT, BucketT> &
LHS,
56 KeyInfoT, BucketT> &
RHS) {
57 if (
LHS.size() !=
RHS.size())
59 for (
const auto &KV :
LHS) {
60 auto I =
RHS.find(KV.first);
61 if (
I ==
RHS.end() || *
I->second != *KV.second)
67template <
typename DerivedT,
typename KeyInfoT,
typename BucketT>
69 KeyInfoT, BucketT> &
LHS,
71 KeyInfoT, BucketT> &
RHS) {
83 void *
Ptr = Allocator.Allocate(
String.size(), 1);
89 SymbolsMapType Symbols;
98 size_t size()
const {
return Symbols.size(); }
100 template <
typename RangeT,
typename ElT = std::remove_reference_t<
101 decltype(*std::begin(std::declval<RangeT>()))>>
104 auto *
Global = addGlobalImpl(Kind, Name, Flags);
105 for (
const auto &Targ : Targets)
123 template <
typename U>
141 return {Symbols.begin(), Symbols.end()};
This file defines the BumpPtrAllocator interface.
This file defines the DenseMap class.
DenseMapIterator< KeyT, ValueT, KeyInfoT, BucketT, true > const_iterator
iterator_range< const_filtered_symbol_iterator > const_filtered_symbol_range
filter_iterator< const_symbol_iterator, std::function< bool(const Symbol *)> > const_filtered_symbol_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)
LLVM_ABI bool operator==(const SymbolSet &O) const
iterator_range< const_symbol_iterator > const_symbol_range
LLVM_ABI Symbol * addGlobal(EncodeKind Kind, StringRef Name, SymbolFlags Flags, const Target &Targ)
LLVM_ABI const Symbol * findSymbol(EncodeKind Kind, StringRef Name, ObjCIFSymbolKind ObjCIF=ObjCIFSymbolKind::None) const
const_filtered_symbol_range undefineds() const
const_symbol_range symbols() 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.
SymbolsMapType::const_iterator I
iterator_adaptor_base()=default
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)
iterator_range< T > make_range(T x, T y)
Convenience function for iterating over sub-ranges.
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...
BumpPtrAllocatorImpl BumpPtrAllocator
The standard BumpPtrAllocator which just uses the default template parameters.
LLVM_ATTRIBUTE_VISIBILITY_DEFAULT AnalysisKey InnerAnalysisManagerProxy< AnalysisManagerT, IRUnitT, ExtraArgTs... >::Key
@ Global
Append to llvm.global_dtors.
hash_code hash_combine(const Ts &...args)
Combine values into a single hash_code.
filter_iterator_impl< WrappedIteratorT, PredicateT, detail::fwd_or_bidi_tag< WrappedIteratorT > > filter_iterator
Defines filter_iterator to a suitable specialization of filter_iterator_impl, based on the underlying...
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)