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 | 34d6281ae535100a62c237e516b92ae9b1ab3b55 (patch) | |
tree | 21beeda9ba0f366cf0c15289077bfbaf832f9729 /clang/lib/CodeGen/CGCall.cpp | |
parent | 1be9e7c0b69b019befa4e480d100e0cf78a48cef (diff) | |
download | bcm5719-llvm-34d6281ae535100a62c237e516b92ae9b1ab3b55.tar.gz bcm5719-llvm-34d6281ae535100a62c237e516b92ae9b1ab3b55.zip |
relax the CGFunctionInfo::CGFunctionInfo ctor to allow any sequence
of CanQualTypes to be passed in.
llvm-svn: 107176
Diffstat (limited to 'clang/lib/CodeGen/CGCall.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGCall.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index cbcd3d12337..820fd9cd3fa 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/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]; } |