diff options
author | Devang Patel <dpatel@apple.com> | 2008-09-25 21:00:45 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2008-09-25 21:00:45 +0000 |
commit | d222f86d9d51a2d6299d43fb876099869430bf0f (patch) | |
tree | 5a33037d52126e5eb635d76afe643d9b854694a1 /lib/VMCore/Instructions.cpp | |
parent | 3829e8a0e4d29e43d934b78935c3e067db8ff195 (diff) | |
download | external_llvm-d222f86d9d51a2d6299d43fb876099869430bf0f.zip external_llvm-d222f86d9d51a2d6299d43fb876099869430bf0f.tar.gz external_llvm-d222f86d9d51a2d6299d43fb876099869430bf0f.tar.bz2 |
Large mechanical patch.
s/ParamAttr/Attribute/g
s/PAList/AttrList/g
s/FnAttributeWithIndex/AttributeWithIndex/g
s/FnAttr/Attribute/g
This sets the stage
- to implement function notes as function attributes and
- to distinguish between function attributes and return value attributes.
This requires corresponding changes in llvm-gcc and clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56622 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Instructions.cpp')
-rw-r--r-- | lib/VMCore/Instructions.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp index 1366d30..1fd51f7 100644 --- a/lib/VMCore/Instructions.cpp +++ b/lib/VMCore/Instructions.cpp @@ -41,17 +41,17 @@ void CallSite::setCallingConv(unsigned CC) { else cast<InvokeInst>(I)->setCallingConv(CC); } -const PAListPtr &CallSite::getParamAttrs() const { +const AttrListPtr &CallSite::getAttributes() const { if (CallInst *CI = dyn_cast<CallInst>(I)) - return CI->getParamAttrs(); + return CI->getAttributes(); else - return cast<InvokeInst>(I)->getParamAttrs(); + return cast<InvokeInst>(I)->getAttributes(); } -void CallSite::setParamAttrs(const PAListPtr &PAL) { +void CallSite::setAttributes(const AttrListPtr &PAL) { if (CallInst *CI = dyn_cast<CallInst>(I)) - CI->setParamAttrs(PAL); + CI->setAttributes(PAL); else - cast<InvokeInst>(I)->setParamAttrs(PAL); + cast<InvokeInst>(I)->setAttributes(PAL); } bool CallSite::paramHasAttr(uint16_t i, Attributes attr) const { if (CallInst *CI = dyn_cast<CallInst>(I)) @@ -394,7 +394,7 @@ CallInst::CallInst(const CallInst &CI) : Instruction(CI.getType(), Instruction::Call, OperandTraits<CallInst>::op_end(this) - CI.getNumOperands(), CI.getNumOperands()) { - setParamAttrs(CI.getParamAttrs()); + setAttributes(CI.getAttributes()); SubclassData = CI.SubclassData; Use *OL = OperandList; Use *InOL = CI.OperandList; @@ -402,20 +402,20 @@ CallInst::CallInst(const CallInst &CI) OL[i] = InOL[i]; } -void CallInst::addParamAttr(unsigned i, Attributes attr) { - PAListPtr PAL = getParamAttrs(); +void CallInst::addAttribute(unsigned i, Attributes attr) { + AttrListPtr PAL = getAttributes(); PAL = PAL.addAttr(i, attr); - setParamAttrs(PAL); + setAttributes(PAL); } -void CallInst::removeParamAttr(unsigned i, Attributes attr) { - PAListPtr PAL = getParamAttrs(); +void CallInst::removeAttribute(unsigned i, Attributes attr) { + AttrListPtr PAL = getAttributes(); PAL = PAL.removeAttr(i, attr); - setParamAttrs(PAL); + setAttributes(PAL); } bool CallInst::paramHasAttr(unsigned i, Attributes attr) const { - if (ParamAttrs.paramHasAttr(i, attr)) + if (AttributeList.paramHasAttr(i, attr)) return true; if (const Function *F = getCalledFunction()) return F->paramHasAttr(i, attr); @@ -456,7 +456,7 @@ InvokeInst::InvokeInst(const InvokeInst &II) OperandTraits<InvokeInst>::op_end(this) - II.getNumOperands(), II.getNumOperands()) { - setParamAttrs(II.getParamAttrs()); + setAttributes(II.getAttributes()); SubclassData = II.SubclassData; Use *OL = OperandList, *InOL = II.OperandList; for (unsigned i = 0, e = II.getNumOperands(); i != e; ++i) @@ -474,23 +474,23 @@ void InvokeInst::setSuccessorV(unsigned idx, BasicBlock *B) { } bool InvokeInst::paramHasAttr(unsigned i, Attributes attr) const { - if (ParamAttrs.paramHasAttr(i, attr)) + if (AttributeList.paramHasAttr(i, attr)) return true; if (const Function *F = getCalledFunction()) return F->paramHasAttr(i, attr); return false; } -void InvokeInst::addParamAttr(unsigned i, Attributes attr) { - PAListPtr PAL = getParamAttrs(); +void InvokeInst::addAttribute(unsigned i, Attributes attr) { + AttrListPtr PAL = getAttributes(); PAL = PAL.addAttr(i, attr); - setParamAttrs(PAL); + setAttributes(PAL); } -void InvokeInst::removeParamAttr(unsigned i, Attributes attr) { - PAListPtr PAL = getParamAttrs(); +void InvokeInst::removeAttribute(unsigned i, Attributes attr) { + AttrListPtr PAL = getAttributes(); PAL = PAL.removeAttr(i, attr); - setParamAttrs(PAL); + setAttributes(PAL); } |