13#ifndef LLVM_TEXTAPI_ARCHITECTURESET_H
14#define LLVM_TEXTAPI_ARCHITECTURESET_H
34 std::numeric_limits<ArchSetType>::max();
48 ArchSet |= 1U <<
static_cast<int>(Arch);
52 ArchSet &= ~(1U <<
static_cast<int>(Arch));
57 return ArchSet & (1U <<
static_cast<int>(Arch));
61 return (ArchSet & Archs.ArchSet) == Archs.ArchSet;
66 bool empty()
const {
return ArchSet == 0; }
71 return has(AK_i386) ||
has(AK_x86_64) ||
has(AK_x86_64h);
86 void findNextSetBit() {
87 if (
Index == EndIndexVal)
89 while (++
Index <
sizeof(Ty) * 8) {
90 if (*ArchSet & (1UL <<
Index))
100 if (
Index != EndIndexVal && !(*ArchSet & (1UL <<
Index)))
118 return std::tie(
Index, ArchSet) == std::tie(o.Index, o.ArchSet);
125 return {ArchSet & o.ArchSet};
129 return {ArchSet | o.ArchSet};
133 ArchSet |= o.ArchSet;
143 return ArchSet == o.ArchSet;
147 return ArchSet != o.ArchSet;
161 operator std::string()
const;
162 operator std::vector<Architecture>()
const;
arch_iterator(Ty *ArchSet, ArchSetType Index=0)
bool operator!=(const arch_iterator &o) const
std::forward_iterator_tag iterator_category
arch_iterator & operator++()
bool operator==(const arch_iterator &o) const
std::size_t difference_type
Architecture operator*() const
arch_iterator operator++(int)
constexpr ArchitectureSet(ArchSetType Raw)
static ArchitectureSet All()
ArchSetType rawValue() const
const_iterator end() const
ArchitectureSet clear(Architecture Arch)
constexpr ArchitectureSet()=default
bool operator==(const ArchitectureSet &o) const
bool has(Architecture Arch) const
void set(Architecture Arch)
const_iterator begin() const
bool contains(ArchitectureSet Archs) const
bool operator!=(const ArchitectureSet &o) const
ArchitectureSet operator&(const ArchitectureSet &o)
ArchitectureSet & operator|=(const Architecture &Arch)
ArchitectureSet(Architecture Arch)
ArchitectureSet & operator|=(const ArchitectureSet &o)
ArchitectureSet operator|(const ArchitectureSet &o)
bool operator<(const ArchitectureSet &o) const
void print(raw_ostream &OS) const
This class implements an extremely fast bulk output stream that can only output to a stream.
ArchitectureSet operator|(const Architecture &lhs, const Architecture &rhs)
Architecture
Defines the architecture slices that are supported by Text-based Stub files.
raw_ostream & operator<<(raw_ostream &OS, Architecture Arch)
This is an optimization pass for GlobalISel generic memory operations.