aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGCall.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-02-02 23:43:58 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-02-02 23:43:58 +0000
commita0a99e02f5b2de3817706071077298ef040634fe (patch)
treea223096e00f6785e83ed79454ca169fbaebbf310 /lib/CodeGen/CGCall.cpp
parent64650af7cc4352c6c67b9bd1bf8ef3ce7471b910 (diff)
Change CGFunctionInfo args iterator to not include the return type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63571 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCall.cpp')
-rw-r--r--lib/CodeGen/CGCall.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp
index 7e2592206e..898c780aae 100644
--- a/lib/CodeGen/CGCall.cpp
+++ b/lib/CodeGen/CGCall.cpp
@@ -97,11 +97,11 @@ CGFunctionInfo::CGFunctionInfo(QualType ResTy,
ArgTypes.insert(ArgTypes.end(), ArgTys.begin(), ArgTys.end());
}
-ArgTypeIterator CGFunctionInfo::argtypes_begin() const {
- return ArgTypes.begin();
+CGFunctionInfo::arg_iterator CGFunctionInfo::arg_begin() const {
+ return ArgTypes.begin()+1;
}
-ArgTypeIterator CGFunctionInfo::argtypes_end() const {
+CGFunctionInfo::arg_iterator CGFunctionInfo::arg_end() const {
return ArgTypes.end();
}
@@ -965,8 +965,7 @@ CodeGenTypes::GetFunctionType(const CGFunctionInfo &FI, bool IsVariadic) {
const llvm::Type *ResultType = 0;
- ArgTypeIterator begin = FI.argtypes_begin(), end = FI.argtypes_end();
- QualType RetTy = *begin;
+ QualType RetTy = FI.getReturnType();
ABIArgInfo RetAI = getABIReturnInfo(RetTy, *this);
switch (RetAI.getKind()) {
case ABIArgInfo::ByVal:
@@ -997,9 +996,10 @@ CodeGenTypes::GetFunctionType(const CGFunctionInfo &FI, bool IsVariadic) {
break;
}
- for (++begin; begin != end; ++begin) {
- ABIArgInfo AI = getABIArgumentInfo(*begin, *this);
- const llvm::Type *Ty = ConvertType(*begin);
+ for (CGFunctionInfo::arg_iterator it = FI.arg_begin(), ie = FI.arg_end();
+ it != ie; ++it) {
+ ABIArgInfo AI = getABIArgumentInfo(*it, *this);
+ const llvm::Type *Ty = ConvertType(*it);
switch (AI.getKind()) {
case ABIArgInfo::Ignore:
@@ -1020,7 +1020,7 @@ CodeGenTypes::GetFunctionType(const CGFunctionInfo &FI, bool IsVariadic) {
break;
case ABIArgInfo::Expand:
- GetExpandedTypes(*begin, ArgTys);
+ GetExpandedTypes(*it, ArgTys);
break;
}
}
@@ -1028,7 +1028,7 @@ CodeGenTypes::GetFunctionType(const CGFunctionInfo &FI, bool IsVariadic) {
return llvm::FunctionType::get(ResultType, ArgTys, IsVariadic);
}
-void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &Info,
+void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI,
const Decl *TargetDecl,
AttributeListType &PAL) {
unsigned FuncAttrs = 0;
@@ -1045,8 +1045,7 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &Info,
FuncAttrs |= llvm::Attribute::ReadNone;
}
- ArgTypeIterator begin = Info.argtypes_begin(), end = Info.argtypes_end();
- QualType RetTy = *begin;
+ QualType RetTy = FI.getReturnType();
unsigned Index = 1;
ABIArgInfo RetAI = getABIReturnInfo(RetTy, getTypes());
switch (RetAI.getKind()) {
@@ -1078,8 +1077,9 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &Info,
if (RetAttrs)
PAL.push_back(llvm::AttributeWithIndex::get(0, RetAttrs));
- for (++begin; begin != end; ++begin) {
- QualType ParamType = *begin;
+ for (CGFunctionInfo::arg_iterator it = FI.arg_begin(), ie = FI.arg_end();
+ it != ie; ++it) {
+ QualType ParamType = *it;
unsigned Attributes = 0;
ABIArgInfo AI = getABIArgumentInfo(ParamType, getTypes());