Lines Matching defs:ArgNo

135 static bool setDoesNotCapture(Function &F, unsigned ArgNo) {
136 if (F.hasParamAttribute(ArgNo, Attribute::Captures))
138 F.addParamAttr(ArgNo, Attribute::getWithCaptureInfo(F.getContext(),
144 static bool setDoesNotAlias(Function &F, unsigned ArgNo) {
145 if (F.hasParamAttribute(ArgNo, Attribute::NoAlias))
147 F.addParamAttr(ArgNo, Attribute::NoAlias);
152 static bool setOnlyReadsMemory(Function &F, unsigned ArgNo) {
153 if (F.hasParamAttribute(ArgNo, Attribute::ReadOnly))
155 F.addParamAttr(ArgNo, Attribute::ReadOnly);
160 static bool setOnlyWritesMemory(Function &F, unsigned ArgNo) {
161 if (F.hasParamAttribute(ArgNo, Attribute::WriteOnly))
163 F.addParamAttr(ArgNo, Attribute::WriteOnly);
180 for (unsigned ArgNo = 0; ArgNo < F.arg_size(); ++ArgNo) {
181 if (!F.hasParamAttribute(ArgNo, Attribute::NoUndef)) {
182 F.addParamAttr(ArgNo, Attribute::NoUndef);
190 static bool setArgNoUndef(Function &F, unsigned ArgNo) {
191 if (F.hasParamAttribute(ArgNo, Attribute::NoUndef))
193 F.addParamAttr(ArgNo, Attribute::NoUndef);
205 static bool setReturnedArg(Function &F, unsigned ArgNo) {
206 if (F.hasParamAttribute(ArgNo, Attribute::Returned))
208 F.addParamAttr(ArgNo, Attribute::Returned);
235 static bool setAlignedAllocParam(Function &F, unsigned ArgNo) {
236 if (F.hasParamAttribute(ArgNo, Attribute::AllocAlign))
238 F.addParamAttr(ArgNo, Attribute::AllocAlign);
242 static bool setAllocatedPointerParam(Function &F, unsigned ArgNo) {
243 if (F.hasParamAttribute(ArgNo, Attribute::AllocatedPointer))
245 F.addParamAttr(ArgNo, Attribute::AllocatedPointer);
1330 static void setArgExtAttr(Function &F, unsigned ArgNo,
1333 if (ExtAttr != Attribute::None && !F.hasParamAttribute(ArgNo, ExtAttr))
1334 F.addParamAttr(ArgNo, ExtAttr);