mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-07 19:36:06 +03:00
Make FuncDeclaration::isIntrinsic and FuncDeclaration::isVaIntrinsic free functions
This commit is contained in:
parent
68649882f4
commit
0f7a3b64c5
6 changed files with 24 additions and 26 deletions
|
@ -449,7 +449,7 @@ static llvm::FunctionType* DtoVaFunctionType(FuncDeclaration* fdecl)
|
|||
llvm::FunctionType* DtoFunctionType(FuncDeclaration* fdecl)
|
||||
{
|
||||
// handle for C vararg intrinsics
|
||||
if (fdecl->isVaIntrinsic())
|
||||
if (DtoIsVaIntrinsic(fdecl))
|
||||
return DtoVaFunctionType(fdecl);
|
||||
|
||||
Type *dthis=0, *dnest=0;
|
||||
|
@ -770,7 +770,7 @@ void DtoDeclareFunction(FuncDeclaration* fdecl)
|
|||
IrFunction *irFunc = getIrFunc(fdecl, true);
|
||||
|
||||
LLFunction* vafunc = 0;
|
||||
if (fdecl->isVaIntrinsic())
|
||||
if (DtoIsVaIntrinsic(fdecl))
|
||||
vafunc = DtoDeclareVaFunction(fdecl);
|
||||
|
||||
// calling convention
|
||||
|
@ -817,7 +817,7 @@ void DtoDeclareFunction(FuncDeclaration* fdecl)
|
|||
irFunc->func = func;
|
||||
|
||||
// parameter attributes
|
||||
if (!fdecl->isIntrinsic()) {
|
||||
if (!DtoIsIntrinsic(fdecl)) {
|
||||
set_param_attrs(f, func, fdecl);
|
||||
if (global.params.disableRedZone) {
|
||||
func->addFnAttr(llvm::Attribute::NoRedZone);
|
||||
|
@ -1298,20 +1298,6 @@ void DtoVariadicArgument(Expression* argexp, LLValue* dst)
|
|||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
bool FuncDeclaration::isIntrinsic()
|
||||
{
|
||||
return (llvmInternal == LLVMintrinsic || isVaIntrinsic());
|
||||
}
|
||||
|
||||
bool FuncDeclaration::isVaIntrinsic()
|
||||
{
|
||||
return (llvmInternal == LLVMva_start ||
|
||||
llvmInternal == LLVMva_copy ||
|
||||
llvmInternal == LLVMva_end);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
int binary(const char *p , const char **tab, int high)
|
||||
{
|
||||
int i = 0, j = high, k, l;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue