mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-24 01:58:21 +00:00
relax the CGFunctionInfo::CGFunctionInfo ctor to allow any sequence
of CanQualTypes to be passed in. llvm-svn: 107176
This commit is contained in:
parent
1be9e7c0b6
commit
34d6281ae5
@ -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];
|
||||
}
|
||||
|
||||
|
@ -83,11 +83,9 @@ namespace CodeGen {
|
||||
typedef const ArgInfo *const_arg_iterator;
|
||||
typedef ArgInfo *arg_iterator;
|
||||
|
||||
CGFunctionInfo(unsigned CallingConvention,
|
||||
bool NoReturn,
|
||||
unsigned RegParm,
|
||||
CanQualType ResTy,
|
||||
const llvm::SmallVectorImpl<CanQualType> &ArgTys);
|
||||
CGFunctionInfo(unsigned CallingConvention, bool NoReturn,
|
||||
unsigned RegParm, CanQualType ResTy,
|
||||
const CanQualType *ArgTys, unsigned NumArgTys);
|
||||
~CGFunctionInfo() { delete[] Args; }
|
||||
|
||||
const_arg_iterator arg_begin() const { return Args + 1; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user