Lines Matching refs:Index
648 uint64_t AttributeSetImpl::Raw(unsigned Index) const {
650 if (getSlotIndex(I) != Index) continue;
734 unsigned Index = I->first;
736 while (I != E && I->first == Index) {
741 AttrPairVec.push_back(std::make_pair(Index,
758 AttributeSet AttributeSet::get(LLVMContext &C, unsigned Index,
794 Attrs.push_back(std::make_pair(Index, Attr));
800 std::make_pair(Index, Attribute::get(C, TDA.first, TDA.second)));
805 AttributeSet AttributeSet::get(LLVMContext &C, unsigned Index,
809 Attrs.push_back(std::make_pair(Index, Attribute::get(C, K)));
813 AttributeSet AttributeSet::get(LLVMContext &C, unsigned Index,
817 Attrs.push_back(std::make_pair(Index, Attribute::get(C, K)));
830 // ordered by index. Because we know that each list in Attrs is ordered by
831 // index we only need to merge each successive list in rather than doing a
851 AttributeSet AttributeSet::addAttribute(LLVMContext &C, unsigned Index,
853 if (hasAttribute(Index, Kind)) return *this;
854 return addAttributes(C, Index, AttributeSet::get(C, Index, Kind));
857 AttributeSet AttributeSet::addAttribute(LLVMContext &C, unsigned Index,
861 return addAttributes(C, Index, AttributeSet::get(C, Index, B));
894 AttributeSet AttributeSet::addAttributes(LLVMContext &C, unsigned Index,
902 unsigned OldAlign = getParamAlignment(Index);
903 unsigned NewAlign = Attrs.getParamAlignment(Index);
914 if (getSlotIndex(I) >= Index) {
915 if (getSlotIndex(I) == Index) AS = getSlotAttributes(LastIndex++);
924 AttrBuilder B(AS, Index);
927 if (Attrs.getSlotIndex(I) == Index) {
934 AttrSet.push_back(AttributeSet::get(C, Index, B));
943 AttributeSet AttributeSet::removeAttribute(LLVMContext &C, unsigned Index,
945 if (!hasAttribute(Index, Kind)) return *this;
946 return removeAttributes(C, Index, AttributeSet::get(C, Index, Kind));
949 AttributeSet AttributeSet::removeAttribute(LLVMContext &C, unsigned Index,
951 if (!hasAttribute(Index, Kind)) return *this;
952 return removeAttributes(C, Index, AttributeSet::get(C, Index, Kind));
955 AttributeSet AttributeSet::removeAttributes(LLVMContext &C, unsigned Index,
962 assert(!Attrs.hasAttribute(Index, Attribute::Alignment) &&
971 if (getSlotIndex(I) >= Index) {
972 if (getSlotIndex(I) == Index) AS = getSlotAttributes(LastIndex++);
981 AttrBuilder B(AS, Index);
984 if (Attrs.getSlotIndex(I) == Index) {
985 B.removeAttributes(Attrs.pImpl->getSlotAttributes(I), Index);
989 AttrSet.push_back(AttributeSet::get(C, Index, B));
998 AttributeSet AttributeSet::removeAttributes(LLVMContext &C, unsigned Index,
1012 if (getSlotIndex(I) >= Index) {
1013 if (getSlotIndex(I) == Index) AS = getSlotAttributes(LastIndex++);
1022 AttrBuilder B(AS, Index);
1025 AttrSet.push_back(AttributeSet::get(C, Index, B));
1034 AttributeSet AttributeSet::addDereferenceableAttr(LLVMContext &C, unsigned Index,
1038 return addAttributes(C, Index, AttributeSet::get(C, Index, B));
1042 unsigned Index,
1046 return addAttributes(C, Index, AttributeSet::get(C, Index, B));
1050 AttributeSet::addAllocSizeAttr(LLVMContext &C, unsigned Index,
1055 return addAttributes(C, Index, AttributeSet::get(C, Index, B));
1066 AttributeSet AttributeSet::getParamAttributes(unsigned Index) const {
1067 return pImpl && hasAttributes(Index) ?
1070 std::make_pair(Index, getAttributes(Index)))) :
1092 bool AttributeSet::hasAttribute(unsigned Index, Attribute::AttrKind Kind) const{
1093 AttributeSetNode *ASN = getAttributes(Index);
1097 bool AttributeSet::hasAttribute(unsigned Index, StringRef Kind) const {
1098 AttributeSetNode *ASN = getAttributes(Index);
1102 bool AttributeSet::hasAttributes(unsigned Index) const {
1103 AttributeSetNode *ASN = getAttributes(Index);
1112 unsigned *Index) const {
1119 if (Index) *Index = pImpl->getSlotIndex(I);
1126 Attribute AttributeSet::getAttribute(unsigned Index,
1128 AttributeSetNode *ASN = getAttributes(Index);
1132 Attribute AttributeSet::getAttribute(unsigned Index,
1134 AttributeSetNode *ASN = getAttributes(Index);
1138 unsigned AttributeSet::getParamAlignment(unsigned Index) const {
1139 AttributeSetNode *ASN = getAttributes(Index);
1143 unsigned AttributeSet::getStackAlignment(unsigned Index) const {
1144 AttributeSetNode *ASN = getAttributes(Index);
1148 uint64_t AttributeSet::getDereferenceableBytes(unsigned Index) const {
1149 AttributeSetNode *ASN = getAttributes(Index);
1153 uint64_t AttributeSet::getDereferenceableOrNullBytes(unsigned Index) const {
1154 AttributeSetNode *ASN = getAttributes(Index);
1159 AttributeSet::getAllocSizeArgs(unsigned Index) const {
1160 AttributeSetNode *ASN = getAttributes(Index);
1164 std::string AttributeSet::getAsString(unsigned Index, bool InAttrGrp) const {
1165 AttributeSetNode *ASN = getAttributes(Index);
1169 AttributeSetNode *AttributeSet::getAttributes(unsigned Index) const {
1174 if (pImpl->getSlotIndex(I) == Index)
1212 uint64_t AttributeSet::Raw(unsigned Index) const {
1214 return pImpl ? pImpl->Raw(Index) : 0;
1221 uint64_t Index = getSlotIndex(i);
1223 if (Index == ~0U)
1226 dbgs() << Index;
1227 dbgs() << " => " << getAsString(Index) << " }\n";
1237 AttrBuilder::AttrBuilder(AttributeSet AS, unsigned Index)
1244 if (pImpl->getSlotIndex(I) != Index) continue;
1315 AttrBuilder &AttrBuilder::removeAttributes(AttributeSet A, uint64_t Index) {
1318 if (A.getSlotIndex(I) == Index) {
1323 assert(Slot != ~0U && "Couldn't find index in AttributeSet!");
1476 bool AttrBuilder::hasAttributes(AttributeSet A, uint64_t Index) const {
1479 if (A.getSlotIndex(I) == Index) {
1484 assert(Slot != ~0U && "Couldn't find the index!");