aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGCall.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2008-09-25 21:02:23 +0000
committerDevang Patel <dpatel@apple.com>2008-09-25 21:02:23 +0000
commit761d7f78e2dac7ea5f35828c2271e60d91e106ce (patch)
treed3a40e4906078aa98ef796a56a9f50ce9ad71f88 /lib/CodeGen/CGCall.cpp
parent27783eb8a030afd153280a15afdede29819d90d2 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56623 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCall.cpp')
-rw-r--r--lib/CodeGen/CGCall.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp
index 68fa0fa02f..7069fee460 100644
--- a/lib/CodeGen/CGCall.cpp
+++ b/lib/CodeGen/CGCall.cpp
@@ -508,17 +508,17 @@ bool CodeGenModule::ReturnTypeUsesSret(QualType RetTy) {
return getABIReturnInfo(RetTy, getContext()).isStructRet();
}
-void CodeGenModule::ConstructParamAttrList(const Decl *TargetDecl,
+void CodeGenModule::ConstructAttributeList(const Decl *TargetDecl,
ArgTypeIterator begin,
ArgTypeIterator end,
- ParamAttrListType &PAL) {
+ AttributeListType &PAL) {
unsigned FuncAttrs = 0;
if (TargetDecl) {
if (TargetDecl->getAttr<NoThrowAttr>())
- FuncAttrs |= llvm::ParamAttr::NoUnwind;
+ FuncAttrs |= llvm::Attribute::NoUnwind;
if (TargetDecl->getAttr<NoReturnAttr>())
- FuncAttrs |= llvm::ParamAttr::NoReturn;
+ FuncAttrs |= llvm::Attribute::NoReturn;
}
QualType RetTy = *begin;
@@ -528,17 +528,17 @@ void CodeGenModule::ConstructParamAttrList(const Decl *TargetDecl,
case ABIArgInfo::Default:
if (RetTy->isPromotableIntegerType()) {
if (RetTy->isSignedIntegerType()) {
- FuncAttrs |= llvm::ParamAttr::SExt;
+ FuncAttrs |= llvm::Attribute::SExt;
} else if (RetTy->isUnsignedIntegerType()) {
- FuncAttrs |= llvm::ParamAttr::ZExt;
+ FuncAttrs |= llvm::Attribute::ZExt;
}
}
break;
case ABIArgInfo::StructRet:
- PAL.push_back(llvm::FnAttributeWithIndex::get(Index,
- llvm::ParamAttr::StructRet|
- llvm::ParamAttr::NoAlias));
+ PAL.push_back(llvm::AttributeWithIndex::get(Index,
+ llvm::Attribute::StructRet|
+ llvm::Attribute::NoAlias));
++Index;
break;
@@ -551,10 +551,10 @@ void CodeGenModule::ConstructParamAttrList(const Decl *TargetDecl,
}
if (FuncAttrs)
- PAL.push_back(llvm::FnAttributeWithIndex::get(0, FuncAttrs));
+ PAL.push_back(llvm::AttributeWithIndex::get(0, FuncAttrs));
for (++begin; begin != end; ++begin) {
QualType ParamType = *begin;
- unsigned ParamAttrs = 0;
+ unsigned Attributes = 0;
ABIArgInfo AI = getABIArgumentInfo(ParamType, getContext());
switch (AI.getKind()) {
@@ -563,16 +563,16 @@ void CodeGenModule::ConstructParamAttrList(const Decl *TargetDecl,
assert(0 && "Invalid ABI kind for non-return argument");
case ABIArgInfo::ByVal:
- ParamAttrs |= llvm::ParamAttr::ByVal;
+ Attributes |= llvm::Attribute::ByVal;
assert(AI.getByValAlignment() == 0 && "FIXME: alignment unhandled");
break;
case ABIArgInfo::Default:
if (ParamType->isPromotableIntegerType()) {
if (ParamType->isSignedIntegerType()) {
- ParamAttrs |= llvm::ParamAttr::SExt;
+ Attributes |= llvm::Attribute::SExt;
} else if (ParamType->isUnsignedIntegerType()) {
- ParamAttrs |= llvm::ParamAttr::ZExt;
+ Attributes |= llvm::Attribute::ZExt;
}
}
break;
@@ -588,8 +588,8 @@ void CodeGenModule::ConstructParamAttrList(const Decl *TargetDecl,
}
}
- if (ParamAttrs)
- PAL.push_back(llvm::FnAttributeWithIndex::get(Index, ParamAttrs));
+ if (Attributes)
+ PAL.push_back(llvm::AttributeWithIndex::get(Index, Attributes));
++Index;
}
}
@@ -749,12 +749,12 @@ RValue CodeGenFunction::EmitCall(llvm::Value *Callee,
CGCallInfo CallInfo(RetTy, CallArgs);
// FIXME: Provide TargetDecl so nounwind, noreturn, etc, etc get set.
- CodeGen::ParamAttrListType ParamAttrList;
- CGM.ConstructParamAttrList(0,
+ CodeGen::AttributeListType AttributeList;
+ CGM.ConstructAttributeList(0,
CallInfo.argtypes_begin(), CallInfo.argtypes_end(),
- ParamAttrList);
- CI->setParamAttrs(llvm::PAListPtr::get(ParamAttrList.begin(),
- ParamAttrList.size()));
+ AttributeList);
+ CI->setAttributes(llvm::AttrListPtr::get(AttributeList.begin(),
+ AttributeList.size()));
if (const llvm::Function *F = dyn_cast<llvm::Function>(Callee))
CI->setCallingConv(F->getCallingConv());