Lines Matching refs:Attrs
396 bool VerifyAttributeCount(AttributeSet Attrs, unsigned Params);
397 void VerifyAttributeTypes(AttributeSet Attrs, unsigned Idx, bool isFunction,
399 void VerifyParameterAttrs(AttributeSet Attrs, unsigned Idx, Type *Ty,
401 void VerifyFunctionAttrs(FunctionType *FT, AttributeSet Attrs,
1228 void Verifier::VerifyAttributeTypes(AttributeSet Attrs, unsigned Idx, in VerifyAttributeTypes() argument
1231 for (unsigned I = 0, E = Attrs.getNumSlots(); I != E; ++I) in VerifyAttributeTypes()
1232 if (Attrs.getSlotIndex(I) == Idx) { in VerifyAttributeTypes()
1239 for (AttributeSet::iterator I = Attrs.begin(Slot), E = Attrs.end(Slot); in VerifyAttributeTypes()
1292 void Verifier::VerifyParameterAttrs(AttributeSet Attrs, unsigned Idx, Type *Ty, in VerifyParameterAttrs() argument
1294 if (!Attrs.hasAttributes(Idx)) in VerifyParameterAttrs()
1297 VerifyAttributeTypes(Attrs, Idx, false, V); in VerifyParameterAttrs()
1300 Assert(!Attrs.hasAttribute(Idx, Attribute::ByVal) && in VerifyParameterAttrs()
1301 !Attrs.hasAttribute(Idx, Attribute::Nest) && in VerifyParameterAttrs()
1302 !Attrs.hasAttribute(Idx, Attribute::StructRet) && in VerifyParameterAttrs()
1303 !Attrs.hasAttribute(Idx, Attribute::NoCapture) && in VerifyParameterAttrs()
1304 !Attrs.hasAttribute(Idx, Attribute::Returned) && in VerifyParameterAttrs()
1305 !Attrs.hasAttribute(Idx, Attribute::InAlloca), in VerifyParameterAttrs()
1313 AttrCount += Attrs.hasAttribute(Idx, Attribute::ByVal); in VerifyParameterAttrs()
1314 AttrCount += Attrs.hasAttribute(Idx, Attribute::InAlloca); in VerifyParameterAttrs()
1315 AttrCount += Attrs.hasAttribute(Idx, Attribute::StructRet) || in VerifyParameterAttrs()
1316 Attrs.hasAttribute(Idx, Attribute::InReg); in VerifyParameterAttrs()
1317 AttrCount += Attrs.hasAttribute(Idx, Attribute::Nest); in VerifyParameterAttrs()
1322 Assert(!(Attrs.hasAttribute(Idx, Attribute::InAlloca) && in VerifyParameterAttrs()
1323 Attrs.hasAttribute(Idx, Attribute::ReadOnly)), in VerifyParameterAttrs()
1328 Assert(!(Attrs.hasAttribute(Idx, Attribute::StructRet) && in VerifyParameterAttrs()
1329 Attrs.hasAttribute(Idx, Attribute::Returned)), in VerifyParameterAttrs()
1334 Assert(!(Attrs.hasAttribute(Idx, Attribute::ZExt) && in VerifyParameterAttrs()
1335 Attrs.hasAttribute(Idx, Attribute::SExt)), in VerifyParameterAttrs()
1340 Assert(!(Attrs.hasAttribute(Idx, Attribute::ReadNone) && in VerifyParameterAttrs()
1341 Attrs.hasAttribute(Idx, Attribute::ReadOnly)), in VerifyParameterAttrs()
1346 Assert(!(Attrs.hasAttribute(Idx, Attribute::NoInline) && in VerifyParameterAttrs()
1347 Attrs.hasAttribute(Idx, Attribute::AlwaysInline)), in VerifyParameterAttrs()
1352 Assert(!AttrBuilder(Attrs, Idx) in VerifyParameterAttrs()
1361 Assert(!Attrs.hasAttribute(Idx, Attribute::ByVal) && in VerifyParameterAttrs()
1362 !Attrs.hasAttribute(Idx, Attribute::InAlloca), in VerifyParameterAttrs()
1367 Assert(!Attrs.hasAttribute(Idx, Attribute::ByVal), in VerifyParameterAttrs()
1375 void Verifier::VerifyFunctionAttrs(FunctionType *FT, AttributeSet Attrs, in VerifyFunctionAttrs() argument
1377 if (Attrs.isEmpty()) in VerifyFunctionAttrs()
1384 for (unsigned i = 0, e = Attrs.getNumSlots(); i != e; ++i) { in VerifyFunctionAttrs()
1385 unsigned Idx = Attrs.getSlotIndex(i); in VerifyFunctionAttrs()
1395 VerifyParameterAttrs(Attrs, Idx, Ty, Idx == 0, V); in VerifyFunctionAttrs()
1400 if (Attrs.hasAttribute(Idx, Attribute::Nest)) { in VerifyFunctionAttrs()
1405 if (Attrs.hasAttribute(Idx, Attribute::Returned)) { in VerifyFunctionAttrs()
1415 if (Attrs.hasAttribute(Idx, Attribute::StructRet)) { in VerifyFunctionAttrs()
1422 if (Attrs.hasAttribute(Idx, Attribute::InAlloca)) { in VerifyFunctionAttrs()
1428 if (!Attrs.hasAttributes(AttributeSet::FunctionIndex)) in VerifyFunctionAttrs()
1431 VerifyAttributeTypes(Attrs, AttributeSet::FunctionIndex, true, V); in VerifyFunctionAttrs()
1434 !(Attrs.hasAttribute(AttributeSet::FunctionIndex, Attribute::ReadNone) && in VerifyFunctionAttrs()
1435 Attrs.hasAttribute(AttributeSet::FunctionIndex, Attribute::ReadOnly)), in VerifyFunctionAttrs()
1439 !(Attrs.hasAttribute(AttributeSet::FunctionIndex, Attribute::NoInline) && in VerifyFunctionAttrs()
1440 Attrs.hasAttribute(AttributeSet::FunctionIndex, in VerifyFunctionAttrs()
1444 if (Attrs.hasAttribute(AttributeSet::FunctionIndex, in VerifyFunctionAttrs()
1446 Assert(Attrs.hasAttribute(AttributeSet::FunctionIndex, Attribute::NoInline), in VerifyFunctionAttrs()
1449 Assert(!Attrs.hasAttribute(AttributeSet::FunctionIndex, in VerifyFunctionAttrs()
1453 Assert(!Attrs.hasAttribute(AttributeSet::FunctionIndex, Attribute::MinSize), in VerifyFunctionAttrs()
1457 if (Attrs.hasAttribute(AttributeSet::FunctionIndex, in VerifyFunctionAttrs()
1474 bool Verifier::VerifyAttributeCount(AttributeSet Attrs, unsigned Params) { in VerifyAttributeCount() argument
1475 if (Attrs.getNumSlots() == 0) in VerifyAttributeCount()
1478 unsigned LastSlot = Attrs.getNumSlots() - 1; in VerifyAttributeCount()
1479 unsigned LastIndex = Attrs.getSlotIndex(LastSlot); in VerifyAttributeCount()
1482 && (LastSlot == 0 || Attrs.getSlotIndex(LastSlot - 1) <= Params))) in VerifyAttributeCount()
1623 AttributeSet Attrs = F.getAttributes(); in visitFunction() local
1625 Assert(VerifyAttributeCount(Attrs, FT->getNumParams()), in visitFunction()
1629 VerifyFunctionAttrs(FT, Attrs, &F); in visitFunction()
1634 Assert(!Attrs.hasAttribute(AttributeSet::FunctionIndex, Attribute::Builtin), in visitFunction()
2139 AttributeSet Attrs = CS.getAttributes(); in VerifyCallSite() local
2141 Assert(VerifyAttributeCount(Attrs, CS.arg_size()), in VerifyCallSite()
2145 VerifyFunctionAttrs(FTy, Attrs, I); in VerifyCallSite()
2163 if (Attrs.hasAttribute(Idx, Attribute::Nest)) in VerifyCallSite()
2165 if (Attrs.hasAttribute(Idx, Attribute::Returned)) in VerifyCallSite()
2172 VerifyParameterAttrs(Attrs, Idx, Ty, false, I); in VerifyCallSite()
2174 if (Attrs.hasAttribute(Idx, Attribute::Nest)) { in VerifyCallSite()
2179 if (Attrs.hasAttribute(Idx, Attribute::Returned)) { in VerifyCallSite()
2189 Assert(!Attrs.hasAttribute(Idx, Attribute::StructRet), in VerifyCallSite()
2192 if (Attrs.hasAttribute(Idx, Attribute::InAlloca)) in VerifyCallSite()
2221 static AttrBuilder getParameterABIAttributes(int I, AttributeSet Attrs) { in getParameterABIAttributes() argument
2227 if (Attrs.hasAttribute(I + 1, AK)) in getParameterABIAttributes()
2230 if (Attrs.hasAttribute(I + 1, Attribute::Alignment)) in getParameterABIAttributes()
2231 Copy.addAlignmentAttr(Attrs.getParamAlignment(I + 1)); in getParameterABIAttributes()