LLVM: lib/TextAPI/ArchitectureSet.cpp Source File (original) (raw)

Go to the documentation of this file.

1

2

3

4

5

6

7

8

9

10

11

12

15

16namespace llvm {

18

21 for (auto Arch : Archs) {

23 continue;

24 set(Arch);

25 }

26}

27

29

30 size_t Cnt = 0;

31 for (unsigned i = 0; i < sizeof(ArchSetType) * 8; ++i)

32 if (ArchSet & (1U << i))

33 ++Cnt;

34 return Cnt;

35}

36

37ArchitectureSet::operator std::string() const {

39 return "[(empty)]";

40

41 std::string result;

43 for (auto arch : *this) {

47 result.append(" ");

48 }

49 return result;

50}

51

52ArchitectureSet::operator std::vector() const {

53 std::vector archs;

54 for (auto arch : *this) {

56 continue;

57 archs.emplace_back(arch);

58 }

59 return archs;

60}

61

63

68

69}

70}

constexpr ArchitectureSet()=default

void set(Architecture Arch)

LLVM_ABI size_t count() const

Definition ArchitectureSet.cpp:28

LLVM_ABI void print(raw_ostream &OS) const

Definition ArchitectureSet.cpp:62

This class implements an extremely fast bulk output stream that can only output to a stream.

LLVM_ABI StringRef getArchitectureName(Architecture Arch)

Convert an architecture slice to a string.

LLVM_ABI raw_ostream & operator<<(raw_ostream &OS, Architecture Arch)

This is an optimization pass for GlobalISel generic memory operations.

auto size(R &&Range, std::enable_if_t< std::is_base_of< std::random_access_iterator_tag, typename std::iterator_traits< decltype(Range.begin())>::iterator_category >::value, void > *=nullptr)

Get the size of a range.

auto count(R &&Range, const E &Element)

Wrapper function around std::count to count the number of times an element Element occurs in the give...