Lines Matching refs:Kind
34 Attribute Attribute::get(LLVMContext &Context, Attribute::AttrKind Kind,
38 ID.AddInteger(Kind);
48 PA = new EnumAttributeImpl(Kind);
50 PA = new IntAttributeImpl(Kind, Val);
58 Attribute Attribute::get(LLVMContext &Context, StringRef Kind, StringRef Val) {
61 ID.AddString(Kind);
70 PA = new StringAttributeImpl(Kind, Val);
122 "Invalid attribute type to get the kind as an enum!");
136 "Invalid attribute type to get the kind as a string!");
147 bool Attribute::hasAttribute(AttrKind Kind) const {
148 return (pImpl && pImpl->hasAttribute(Kind)) || (!pImpl && Kind == None);
151 bool Attribute::hasAttribute(StringRef Kind) const {
153 return pImpl && pImpl->hasAttribute(Kind);
316 // "kind"
317 // "kind" = "value"
355 bool AttributeImpl::hasAttribute(StringRef Kind) const {
357 return getKindAsString() == Kind;
504 bool AttributeSetNode::hasAttribute(Attribute::AttrKind Kind) const {
506 if (I->hasAttribute(Kind))
511 bool AttributeSetNode::hasAttribute(StringRef Kind) const {
513 if (I->hasAttribute(Kind))
518 Attribute AttributeSetNode::getAttribute(Attribute::AttrKind Kind) const {
520 if (I->hasAttribute(Kind))
525 Attribute AttributeSetNode::getAttribute(StringRef Kind) const {
527 if (I->hasAttribute(Kind))
587 Attribute::AttrKind Kind = Attr.getKindAsEnum();
589 if (Kind == Attribute::Alignment)
591 else if (Kind == Attribute::StackAlignment)
593 else if (Kind == Attribute::Dereferenceable)
596 Mask |= AttributeImpl::getAttrMask(Kind);
688 for (Attribute::AttrKind Kind = Attribute::None;
689 Kind != Attribute::EndAttrKinds; Kind = Attribute::AttrKind(Kind + 1)) {
690 if (!B.contains(Kind))
694 switch (Kind) {
710 Attr = Attribute::get(C, Kind);
724 ArrayRef<Attribute::AttrKind> Kind) {
726 for (Attribute::AttrKind K : Kind)
768 StringRef Kind) const {
770 B.addAttribute(Kind);
775 StringRef Kind, StringRef Value) const {
777 B.addAttribute(Kind, Value);
994 bool AttributeSet::hasAttribute(unsigned Index, Attribute::AttrKind Kind) const{
996 return ASN && ASN->hasAttribute(Kind);
999 bool AttributeSet::hasAttribute(unsigned Index, StringRef Kind) const {
1001 return ASN && ASN->hasAttribute(Kind);
1024 Attribute::AttrKind Kind) const {
1026 return ASN ? ASN->getAttribute(Kind) : Attribute();
1030 StringRef Kind) const {
1032 return ASN ? ASN->getAttribute(Kind) : Attribute();
1171 Attribute::AttrKind Kind = Attr.getKindAsEnum();
1172 Attrs[Kind] = true;
1174 if (Kind == Attribute::Alignment)
1176 else if (Kind == Attribute::StackAlignment)
1178 else if (Kind == Attribute::Dereferenceable)
1180 else if (Kind == Attribute::DereferenceableOrNull)
1357 assert(Attr.isStringAttribute() && "Invalid attribute kind!");