mirror of
https://github.com/dlang/dmd.git
synced 2025-04-27 21:51:03 +03:00
Move genCfunc to cxxfrontend (#20992)
This commit is contained in:
parent
d5e6f49098
commit
57a60e575c
4 changed files with 18 additions and 7 deletions
|
@ -276,6 +276,19 @@ bool fill(StructDeclaration sd, Loc loc,
|
||||||
return dmd.expressionsem.fill(sd, loc, elements, ctorinit);
|
return dmd.expressionsem.fill(sd, loc, elements, ctorinit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***********************************************************
|
||||||
|
* func.d
|
||||||
|
*/
|
||||||
|
FuncDeclaration genCfunc(Parameters* fparams, Type treturn, const(char)* name, StorageClass stc = STC.none)
|
||||||
|
{
|
||||||
|
return FuncDeclaration.genCfunc(fparams, treturn, name, cast(STC) stc);
|
||||||
|
}
|
||||||
|
|
||||||
|
FuncDeclaration genCfunc(Parameters* fparams, Type treturn, Identifier id, StorageClass stc = STC.none)
|
||||||
|
{
|
||||||
|
return FuncDeclaration.genCfunc(fparams, treturn, id, cast(STC) stc);
|
||||||
|
}
|
||||||
|
|
||||||
/***********************************************************
|
/***********************************************************
|
||||||
* funcsem.d
|
* funcsem.d
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -726,13 +726,13 @@ public:
|
||||||
bool hasNestedFrameRefs();
|
bool hasNestedFrameRefs();
|
||||||
ParameterList getParameterList();
|
ParameterList getParameterList();
|
||||||
|
|
||||||
static FuncDeclaration *genCfunc(Parameters *args, Type *treturn, const char *name, StorageClass stc=0);
|
|
||||||
static FuncDeclaration *genCfunc(Parameters *args, Type *treturn, Identifier *id, StorageClass stc=0);
|
|
||||||
|
|
||||||
virtual FuncDeclaration *toAliasFunc() { return this; }
|
virtual FuncDeclaration *toAliasFunc() { return this; }
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
FuncDeclaration *genCfunc(Parameters *args, Type *treturn, const char *name, StorageClass stc=0);
|
||||||
|
FuncDeclaration *genCfunc(Parameters *args, Type *treturn, Identifier *id, StorageClass stc=0);
|
||||||
|
|
||||||
class FuncAliasDeclaration final : public FuncDeclaration
|
class FuncAliasDeclaration final : public FuncDeclaration
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -4052,8 +4052,6 @@ public:
|
||||||
bool needsClosure();
|
bool needsClosure();
|
||||||
bool hasNestedFrameRefs();
|
bool hasNestedFrameRefs();
|
||||||
ParameterList getParameterList();
|
ParameterList getParameterList();
|
||||||
static FuncDeclaration* genCfunc(Array<Parameter* >* fparams, Type* treturn, const char* name, STC stc = (STC)0LLU);
|
|
||||||
static FuncDeclaration* genCfunc(Array<Parameter* >* fparams, Type* treturn, Identifier* id, STC stc = (STC)0LLU);
|
|
||||||
virtual FuncDeclaration* toAliasFunc();
|
virtual FuncDeclaration* toAliasFunc();
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1006,12 +1006,12 @@ extern (C++) class FuncDeclaration : Declaration
|
||||||
/**********************************
|
/**********************************
|
||||||
* Generate a FuncDeclaration for a runtime library function.
|
* Generate a FuncDeclaration for a runtime library function.
|
||||||
*/
|
*/
|
||||||
static FuncDeclaration genCfunc(Parameters* fparams, Type treturn, const(char)* name, STC stc = STC.none)
|
extern(D) static FuncDeclaration genCfunc(Parameters* fparams, Type treturn, const(char)* name, STC stc = STC.none)
|
||||||
{
|
{
|
||||||
return genCfunc(fparams, treturn, Identifier.idPool(name[0 .. strlen(name)]), stc);
|
return genCfunc(fparams, treturn, Identifier.idPool(name[0 .. strlen(name)]), stc);
|
||||||
}
|
}
|
||||||
|
|
||||||
static FuncDeclaration genCfunc(Parameters* fparams, Type treturn, Identifier id, STC stc = STC.none)
|
extern(D) static FuncDeclaration genCfunc(Parameters* fparams, Type treturn, Identifier id, STC stc = STC.none)
|
||||||
{
|
{
|
||||||
FuncDeclaration fd;
|
FuncDeclaration fd;
|
||||||
TypeFunction tf;
|
TypeFunction tf;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue