Tweak CGCall functions:
- Move actual param attr list creation to
CodeGenFunction::ConstructParamAttrList.
- Make ReturnTypeUsesSret static.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56038 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGCall.h b/lib/CodeGen/CGCall.h
index efeb6ee..c51c1d0 100644
--- a/lib/CodeGen/CGCall.h
+++ b/lib/CodeGen/CGCall.h
@@ -46,6 +46,10 @@
/// ParmVarDecl or ImplicitParamDecl.
typedef llvm::SmallVector<std::pair<const VarDecl*, QualType>,
16> FunctionArgList;
+
+ // FIXME: This should be a better iterator type so that we can avoid
+ // construction of the ArgTypes smallvectors.
+ typedef llvm::SmallVector<QualType, 16>::const_iterator ArgTypeIterator;
/// CGFunctionInfo - Class to encapsulate the information about a
/// function definition.
@@ -63,21 +67,20 @@
const Decl* getDecl() const { return TheDecl; }
- void constructParamAttrList(ParamAttrListType &Args) const;
+ ArgTypeIterator argtypes_begin() const;
+ ArgTypeIterator argtypes_end() const;
};
/// CGCallInfo - Class to encapsulate the arguments and clang types
/// used in a call.
class CGCallInfo {
- QualType ResultType;
- const CallArgList &Args;
-
llvm::SmallVector<QualType, 16> ArgTypes;
public:
CGCallInfo(QualType _ResultType, const CallArgList &Args);
-
- void constructParamAttrList(ParamAttrListType &Args) const;
+
+ ArgTypeIterator argtypes_begin() const;
+ ArgTypeIterator argtypes_end() const;
};
} // end namespace CodeGen
} // end namespace clang