mirror of
https://github.com/dlang/dmd.git
synced 2025-04-25 20:50:41 +03:00
[stable] C++ header fixes for declaration, expression, and typinf (#21016)
Seen either from compilation errors or missing symbols at link time.
This commit is contained in:
parent
8c9769fef4
commit
7f22e651ed
5 changed files with 25 additions and 4 deletions
|
@ -16,6 +16,7 @@ import dmd.astenums;
|
|||
import dmd.attrib;
|
||||
import dmd.common.outbuffer : OutBuffer;
|
||||
import dmd.dclass : ClassDeclaration;
|
||||
import dmd.declaration : TypeInfoDeclaration;
|
||||
import dmd.denum : EnumDeclaration;
|
||||
import dmd.dmodule /*: Module*/;
|
||||
import dmd.dscope : Scope;
|
||||
|
@ -728,6 +729,18 @@ bool builtinTypeInfo(Type t)
|
|||
return dmd.typinf.builtinTypeInfo(t);
|
||||
}
|
||||
|
||||
Type makeNakedAssociativeArray(TypeAArray t)
|
||||
{
|
||||
import dmd.typinf;
|
||||
return dmd.typinf.makeNakedAssociativeArray(t);
|
||||
}
|
||||
|
||||
TypeInfoDeclaration getTypeInfoAssocArrayDeclaration(TypeAArray t, Scope* sc)
|
||||
{
|
||||
import dmd.typinf;
|
||||
return dmd.typinf.getTypeInfoAssocArrayDeclaration(t, sc);
|
||||
}
|
||||
|
||||
version (IN_LLVM)
|
||||
{
|
||||
/***********************************************************
|
||||
|
|
|
@ -37,6 +37,8 @@ namespace dmd
|
|||
bool checkClosure(FuncDeclaration* fd);
|
||||
MATCH leastAsSpecialized(FuncDeclaration *f, FuncDeclaration *g, Identifiers *names);
|
||||
PURE isPure(FuncDeclaration *f);
|
||||
FuncDeclaration *genCfunc(Parameters *args, Type *treturn, const char *name, StorageClass stc=0);
|
||||
FuncDeclaration *genCfunc(Parameters *args, Type *treturn, Identifier *id, StorageClass stc=0);
|
||||
}
|
||||
|
||||
//enum STC : ulong from astenums.d:
|
||||
|
@ -730,9 +732,6 @@ public:
|
|||
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
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -40,6 +40,7 @@ class OverloadSet;
|
|||
class StringExp;
|
||||
class InterpExp;
|
||||
class LoweredAssignExp;
|
||||
class StaticForeach;
|
||||
#ifdef IN_GCC
|
||||
typedef union tree_node Symbol;
|
||||
#else
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
|
||||
class Expression;
|
||||
class Type;
|
||||
class TypeAArray;
|
||||
class TypeInfoDeclaration;
|
||||
struct Scope;
|
||||
|
||||
namespace dmd
|
||||
|
@ -21,5 +23,7 @@ namespace dmd
|
|||
bool genTypeInfo(Expression *e, Loc loc, Type *torig, Scope *sc);
|
||||
bool isSpeculativeType(Type *t);
|
||||
bool builtinTypeInfo(Type *t);
|
||||
Type *makeNakedAssociativeArray(TypeAArray *t);
|
||||
TypeInfoDeclaration *getTypeInfoAssocArrayDeclaration(TypeAArray *t, Scope *sc);
|
||||
}
|
||||
Type *getTypeInfoType(Loc loc, Type *t, Scope *sc);
|
||||
|
|
|
@ -1736,12 +1736,14 @@ void argtypes_h(Type *t)
|
|||
//dmd::isHFVA(t);
|
||||
}
|
||||
|
||||
void declaration_h(FuncDeclaration *fd, Loc loc, Expressions* args)
|
||||
void declaration_h(FuncDeclaration *fd, Loc loc, Expressions* args, Parameters* params)
|
||||
{
|
||||
dmd::functionSemantic(fd);
|
||||
dmd::functionSemantic3(fd);
|
||||
::eval_builtin(loc, fd, args);
|
||||
::isBuiltin(fd);
|
||||
dmd::genCfunc(params, fd->type, "test");
|
||||
dmd::genCfunc(params, fd->type, Identifier::idPool("test"));
|
||||
}
|
||||
|
||||
void doc_h(Module *m, const char *ptr, d_size_t length, const char *date,
|
||||
|
@ -1874,4 +1876,6 @@ void typinf_h(Expression *e, Loc loc, Type *t, Scope *sc)
|
|||
::getTypeInfoType(loc, t, sc);
|
||||
dmd::isSpeculativeType(t);
|
||||
dmd::builtinTypeInfo(t);
|
||||
dmd::makeNakedAssociativeArray(t->isTypeAArray());
|
||||
dmd::getTypeInfoAssocArrayDeclaration(t->isTypeAArray(), sc);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue