diff options
author | Chris Lattner <sabre@nondot.org> | 2010-06-29 18:13:52 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-06-29 18:13:52 +0000 |
commit | bb52114f81e8829fe29a9a0faa49e8b2157206cc (patch) | |
tree | 8f00b7f666d3a6802e74daf684156430aea810d5 /lib/CodeGen/CGCall.cpp | |
parent | cfa6a27f3cc5add888c6ac84dbcc45854cfd8666 (diff) |
relax the CGFunctionInfo::CGFunctionInfo ctor to allow any sequence
of CanQualTypes to be passed in.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107176 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCall.cpp')
-rw-r--r-- | lib/CodeGen/CGCall.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp index cbcd3d1233..820fd9cd3f 100644 --- a/lib/CodeGen/CGCall.cpp +++ b/lib/CodeGen/CGCall.cpp @@ -240,7 +240,7 @@ const CGFunctionInfo &CodeGenTypes::getFunctionInfo(CanQualType ResTy, // Construct the function info. FI = new CGFunctionInfo(CC, Info.getNoReturn(), Info.getRegParm(), ResTy, - ArgTys); + ArgTys.data(), ArgTys.size()); FunctionInfos.InsertNode(FI, InsertPos); // ABI lowering wants to know what our preferred type for the argument is in @@ -267,20 +267,20 @@ const CGFunctionInfo &CodeGenTypes::getFunctionInfo(CanQualType ResTy, } CGFunctionInfo::CGFunctionInfo(unsigned _CallingConvention, - bool _NoReturn, - unsigned _RegParm, + bool _NoReturn, unsigned _RegParm, CanQualType ResTy, - const llvm::SmallVectorImpl<CanQualType> &ArgTys) + const CanQualType *ArgTys, + unsigned NumArgTys) : CallingConvention(_CallingConvention), EffectiveCallingConvention(_CallingConvention), NoReturn(_NoReturn), RegParm(_RegParm) { - NumArgs = ArgTys.size(); + NumArgs = NumArgTys; // FIXME: Coallocate with the CGFunctionInfo object. - Args = new ArgInfo[1 + NumArgs]; + Args = new ArgInfo[1 + NumArgTys]; Args[0].type = ResTy; - for (unsigned i = 0; i < NumArgs; ++i) + for (unsigned i = 0; i != NumArgTys; ++i) Args[1 + i].type = ArgTys[i]; } |