Add functions to enable adding a single attribute to a function and
its associated call site. llvm-svn: 51204
This commit is contained in:
@@ -373,6 +373,12 @@ CallInst::CallInst(const CallInst &CI)
|
||||
OL[i].init(InOL[i], this);
|
||||
}
|
||||
|
||||
void CallInst::addParamAttr(unsigned i, ParameterAttributes attr) {
|
||||
PAListPtr PAL = getParamAttrs();
|
||||
PAL = PAL.addAttr(i, attr);
|
||||
setParamAttrs(PAL);
|
||||
}
|
||||
|
||||
bool CallInst::paramHasAttr(unsigned i, ParameterAttributes attr) const {
|
||||
if (ParamAttrs.paramHasAttr(i, attr))
|
||||
return true;
|
||||
@@ -449,6 +455,12 @@ bool InvokeInst::paramHasAttr(unsigned i, ParameterAttributes attr) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
void InvokeInst::addParamAttr(unsigned i, ParameterAttributes attr) {
|
||||
PAListPtr PAL = getParamAttrs();
|
||||
PAL = PAL.addAttr(i, attr);
|
||||
setParamAttrs(PAL);
|
||||
}
|
||||
|
||||
void InvokeInst::setDoesNotThrow(bool doesNotThrow) {
|
||||
PAListPtr PAL = getParamAttrs();
|
||||
if (doesNotThrow)
|
||||
|
||||
Reference in New Issue
Block a user