LLVM: include/llvm/IR/AttributeMask.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14#ifndef LLVM_IR_ATTRIBUTEMASK_H
15#define LLVM_IR_ATTRIBUTEMASK_H
16
19#include
20#include
21#include
22
23namespace llvm {
24
25
26
27
28
30 std::bitsetAttribute::EndAttrKinds Attrs;
31 std::set<SmallString<32>, std::less<>> TargetDepAttrs;
32
33public:
37
42
43
46 "Attribute out of range!");
47 Attrs[Val] = true;
48 return *this;
49 }
50
51
53 if (A.isStringAttribute())
55 else
57 return *this;
58 }
59
60
62 TargetDepAttrs.insert(A);
63 return *this;
64 }
65
66
71
72
73
75
76
78 if (A.isStringAttribute())
79 return contains(A.getKindAsString());
80 return contains(A.getKindAsEnum());
81 }
82};
83
84}
85
86#endif
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
This file contains the simple types necessary to represent the attributes associated with functions a...
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
This file defines the SmallString class.
AttributeMask(AttributeSet AS)
Definition AttributeMask.h:38
bool contains(StringRef A) const
Return true if the builder has the specified target-dependent attribute.
Definition AttributeMask.h:74
AttributeMask(const AttributeMask &)=delete
AttributeMask & addAttribute(StringRef A)
Add the target-dependent attribute to the builder.
Definition AttributeMask.h:61
AttributeMask & addAttribute(Attribute::AttrKind Val)
Add an attribute to the mask.
Definition AttributeMask.h:44
AttributeMask(AttributeMask &&)=default
bool contains(Attribute::AttrKind A) const
Return true if the builder has the specified attribute.
Definition AttributeMask.h:67
AttributeMask & addAttribute(Attribute A)
Add the Attribute object to the builder.
Definition AttributeMask.h:52
bool contains(Attribute A) const
Return true if the mask contains the specified attribute.
Definition AttributeMask.h:77
This class holds the attributes for a particular argument, parameter, function, or return value.
Functions, function parameters, and return types can have attributes to indicate how they should be t...
AttrKind
This enumeration lists the attributes that can be associated with parameters, function results,...
@ EndAttrKinds
Sentinel value useful for loops.
StringRef - Represent a constant reference to a string, i.e.
This is an optimization pass for GlobalISel generic memory operations.