mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-10 12:59:21 +03:00
* Moved ir/irsymbol.cpp/h into ir/irdsymbol.cpp/h.
* Added #if IN_DMD versioning around DMD backend specific code in the D1 frontend, D2 is currently broken. * All part of a greater cleanup scheme.
This commit is contained in:
parent
367b8da8f4
commit
c42c90ea80
27 changed files with 283 additions and 638 deletions
|
@ -98,10 +98,12 @@ struct AggregateDeclaration : ScopeDsymbol
|
|||
|
||||
enum PROT prot();
|
||||
|
||||
#if IN_DMD
|
||||
// Back end
|
||||
Symbol *stag; // tag symbol for debug data
|
||||
Symbol *sinit;
|
||||
Symbol *toInitializer();
|
||||
#endif
|
||||
|
||||
AggregateDeclaration *isAggregateDeclaration() { return this; }
|
||||
};
|
||||
|
@ -250,6 +252,7 @@ struct ClassDeclaration : AggregateDeclaration
|
|||
|
||||
// Back end
|
||||
void toObjFile(int multiobj); // compile to .obj file
|
||||
#if IN_DMD
|
||||
void toDebug();
|
||||
unsigned baseVtblOffset(BaseClass *bc);
|
||||
Symbol *toSymbol();
|
||||
|
@ -258,6 +261,7 @@ struct ClassDeclaration : AggregateDeclaration
|
|||
void toDt2(dt_t **pdt, ClassDeclaration *cd);
|
||||
|
||||
Symbol *vtblsym;
|
||||
#endif
|
||||
|
||||
ClassDeclaration *isClassDeclaration() { return (ClassDeclaration *)this; }
|
||||
};
|
||||
|
@ -280,7 +284,9 @@ struct InterfaceDeclaration : ClassDeclaration
|
|||
virtual int isCOMinterface();
|
||||
|
||||
void toObjFile(int multiobj); // compile to .obj file
|
||||
#if IN_DMD
|
||||
Symbol *toSymbol();
|
||||
#endif
|
||||
|
||||
InterfaceDeclaration *isInterfaceDeclaration() { return this; }
|
||||
};
|
||||
|
|
|
@ -27,19 +27,23 @@
|
|||
#include "parse.h"
|
||||
#include "template.h"
|
||||
|
||||
#if IN_LLVM
|
||||
#include "../gen/enums.h"
|
||||
|
||||
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
|
||||
static llvm::cl::opt<bool> ignoreUnsupportedPragmas("ignore",
|
||||
llvm::cl::desc("Ignore unsupported pragmas"),
|
||||
llvm::cl::ZeroOrMore);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
extern void obj_includelib(const char *name);
|
||||
|
||||
#if IN_DMD
|
||||
void obj_startaddress(Symbol *s);
|
||||
#endif
|
||||
|
||||
|
||||
/********************************* AttribDeclaration ****************************/
|
||||
|
@ -180,6 +184,7 @@ void AttribDeclaration::toObjFile(int multiobj)
|
|||
}
|
||||
}
|
||||
|
||||
#if IN_DMD
|
||||
int AttribDeclaration::cvMember(unsigned char *p)
|
||||
{
|
||||
int nwritten = 0;
|
||||
|
@ -198,6 +203,7 @@ int AttribDeclaration::cvMember(unsigned char *p)
|
|||
}
|
||||
return nwritten;
|
||||
}
|
||||
#endif
|
||||
|
||||
int AttribDeclaration::hasPointers()
|
||||
{
|
||||
|
|
|
@ -57,7 +57,9 @@ ClassDeclaration::ClassDeclaration(Loc loc, Identifier *id, BaseClasses *basecla
|
|||
staticCtor = NULL;
|
||||
staticDtor = NULL;
|
||||
|
||||
#if IN_DMD
|
||||
vtblsym = NULL;
|
||||
#endif
|
||||
vclassinfo = NULL;
|
||||
|
||||
if (id)
|
||||
|
|
|
@ -255,7 +255,9 @@ TypedefDeclaration::TypedefDeclaration(Loc loc, Identifier *id, Type *basetype,
|
|||
this->sem = 0;
|
||||
this->inuse = 0;
|
||||
this->loc = loc;
|
||||
#if IN_DMD
|
||||
this->sinit = NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
Dsymbol *TypedefDeclaration::syntaxCopy(Dsymbol *s)
|
||||
|
|
|
@ -191,13 +191,17 @@ struct TypedefDeclaration : Declaration
|
|||
void toDocBuffer(OutBuffer *buf);
|
||||
|
||||
void toObjFile(int multiobj); // compile to .obj file
|
||||
#if IN_DMD
|
||||
void toDebug();
|
||||
int cvMember(unsigned char *p);
|
||||
#endif
|
||||
|
||||
TypedefDeclaration *isTypedefDeclaration() { return this; }
|
||||
|
||||
#if IN_DMD
|
||||
Symbol *sinit;
|
||||
Symbol *toInitializer();
|
||||
#endif
|
||||
};
|
||||
|
||||
/**************************************************************/
|
||||
|
@ -264,17 +268,21 @@ struct VarDeclaration : Declaration
|
|||
void checkNestedReference(Scope *sc, Loc loc);
|
||||
Dsymbol *toAlias();
|
||||
|
||||
Symbol *toSymbol();
|
||||
void toObjFile(int multiobj); // compile to .obj file
|
||||
#if IN_DMD
|
||||
Symbol *toSymbol();
|
||||
int cvMember(unsigned char *p);
|
||||
#endif
|
||||
|
||||
// Eliminate need for dynamic_cast
|
||||
VarDeclaration *isVarDeclaration() { return (VarDeclaration *)this; }
|
||||
|
||||
#if IN_LLVM
|
||||
// LDC
|
||||
AnonDeclaration* anonDecl;
|
||||
unsigned offset2;
|
||||
bool nakedUse;
|
||||
#endif
|
||||
};
|
||||
|
||||
/**************************************************************/
|
||||
|
@ -287,7 +295,9 @@ struct StaticStructInitDeclaration : Declaration
|
|||
|
||||
StaticStructInitDeclaration(Loc loc, StructDeclaration *dsym);
|
||||
|
||||
#if IN_DMD
|
||||
Symbol *toSymbol();
|
||||
#endif
|
||||
|
||||
// Eliminate need for dynamic_cast
|
||||
StaticStructInitDeclaration *isStaticStructInitDeclaration() { return (StaticStructInitDeclaration *)this; }
|
||||
|
@ -303,7 +313,9 @@ struct ClassInfoDeclaration : VarDeclaration
|
|||
|
||||
void emitComment(Scope *sc);
|
||||
|
||||
#if IN_DMD
|
||||
Symbol *toSymbol();
|
||||
#endif
|
||||
|
||||
ClassInfoDeclaration* isClassInfoDeclaration() { return this; }
|
||||
};
|
||||
|
@ -318,7 +330,9 @@ struct ModuleInfoDeclaration : VarDeclaration
|
|||
|
||||
void emitComment(Scope *sc);
|
||||
|
||||
#if IN_DMD
|
||||
Symbol *toSymbol();
|
||||
#endif
|
||||
};
|
||||
|
||||
struct TypeInfoDeclaration : VarDeclaration
|
||||
|
@ -331,147 +345,199 @@ struct TypeInfoDeclaration : VarDeclaration
|
|||
|
||||
void emitComment(Scope *sc);
|
||||
|
||||
Symbol *toSymbol();
|
||||
void toObjFile(int multiobj); // compile to .obj file
|
||||
#if IN_DMD
|
||||
Symbol *toSymbol();
|
||||
virtual void toDt(dt_t **pdt);
|
||||
#endif
|
||||
|
||||
virtual TypeInfoDeclaration* isTypeInfoDeclaration() { return this; }
|
||||
|
||||
#if IN_LLVM
|
||||
// LDC
|
||||
virtual void llvmDeclare();
|
||||
virtual void llvmDefine();
|
||||
#endif
|
||||
};
|
||||
|
||||
struct TypeInfoStructDeclaration : TypeInfoDeclaration
|
||||
{
|
||||
TypeInfoStructDeclaration(Type *tinfo);
|
||||
|
||||
#if IN_DMD
|
||||
void toDt(dt_t **pdt);
|
||||
#endif
|
||||
|
||||
#if IN_LLVM
|
||||
// LDC
|
||||
void llvmDeclare();
|
||||
void llvmDefine();
|
||||
#endif
|
||||
};
|
||||
|
||||
struct TypeInfoClassDeclaration : TypeInfoDeclaration
|
||||
{
|
||||
TypeInfoClassDeclaration(Type *tinfo);
|
||||
|
||||
#if IN_DMD
|
||||
void toDt(dt_t **pdt);
|
||||
#endif
|
||||
|
||||
#if IN_LLVM
|
||||
// LDC
|
||||
void llvmDeclare();
|
||||
void llvmDefine();
|
||||
#endif
|
||||
};
|
||||
|
||||
struct TypeInfoInterfaceDeclaration : TypeInfoDeclaration
|
||||
{
|
||||
TypeInfoInterfaceDeclaration(Type *tinfo);
|
||||
|
||||
#if IN_DMD
|
||||
void toDt(dt_t **pdt);
|
||||
#endif
|
||||
|
||||
#if IN_LLVM
|
||||
// LDC
|
||||
void llvmDeclare();
|
||||
void llvmDefine();
|
||||
#endif
|
||||
};
|
||||
|
||||
struct TypeInfoTypedefDeclaration : TypeInfoDeclaration
|
||||
{
|
||||
TypeInfoTypedefDeclaration(Type *tinfo);
|
||||
|
||||
#if IN_DMD
|
||||
void toDt(dt_t **pdt);
|
||||
#endif
|
||||
|
||||
#if IN_LLVM
|
||||
// LDC
|
||||
void llvmDeclare();
|
||||
void llvmDefine();
|
||||
#endif
|
||||
};
|
||||
|
||||
struct TypeInfoPointerDeclaration : TypeInfoDeclaration
|
||||
{
|
||||
TypeInfoPointerDeclaration(Type *tinfo);
|
||||
|
||||
#if IN_DMD
|
||||
void toDt(dt_t **pdt);
|
||||
#endif
|
||||
|
||||
#if IN_LLVM
|
||||
// LDC
|
||||
void llvmDeclare();
|
||||
void llvmDefine();
|
||||
#endif
|
||||
};
|
||||
|
||||
struct TypeInfoArrayDeclaration : TypeInfoDeclaration
|
||||
{
|
||||
TypeInfoArrayDeclaration(Type *tinfo);
|
||||
|
||||
#if IN_DMD
|
||||
void toDt(dt_t **pdt);
|
||||
#endif
|
||||
|
||||
#if IN_LLVM
|
||||
// LDC
|
||||
void llvmDeclare();
|
||||
void llvmDefine();
|
||||
#endif
|
||||
};
|
||||
|
||||
struct TypeInfoStaticArrayDeclaration : TypeInfoDeclaration
|
||||
{
|
||||
TypeInfoStaticArrayDeclaration(Type *tinfo);
|
||||
|
||||
#if IN_DMD
|
||||
void toDt(dt_t **pdt);
|
||||
#endif
|
||||
|
||||
#if IN_LLVM
|
||||
// LDC
|
||||
void llvmDeclare();
|
||||
void llvmDefine();
|
||||
#endif
|
||||
};
|
||||
|
||||
struct TypeInfoAssociativeArrayDeclaration : TypeInfoDeclaration
|
||||
{
|
||||
TypeInfoAssociativeArrayDeclaration(Type *tinfo);
|
||||
|
||||
#if IN_DMD
|
||||
void toDt(dt_t **pdt);
|
||||
#endif
|
||||
|
||||
#if IN_LLVM
|
||||
// LDC
|
||||
void llvmDeclare();
|
||||
void llvmDefine();
|
||||
#endif
|
||||
};
|
||||
|
||||
struct TypeInfoEnumDeclaration : TypeInfoDeclaration
|
||||
{
|
||||
TypeInfoEnumDeclaration(Type *tinfo);
|
||||
|
||||
#if IN_DMD
|
||||
void toDt(dt_t **pdt);
|
||||
#endif
|
||||
|
||||
#if IN_LLVM
|
||||
// LDC
|
||||
void llvmDeclare();
|
||||
void llvmDefine();
|
||||
#endif
|
||||
};
|
||||
|
||||
struct TypeInfoFunctionDeclaration : TypeInfoDeclaration
|
||||
{
|
||||
TypeInfoFunctionDeclaration(Type *tinfo);
|
||||
|
||||
#if IN_DMD
|
||||
void toDt(dt_t **pdt);
|
||||
#endif
|
||||
|
||||
#if IN_LLVM
|
||||
// LDC
|
||||
void llvmDeclare();
|
||||
void llvmDefine();
|
||||
#endif
|
||||
};
|
||||
|
||||
struct TypeInfoDelegateDeclaration : TypeInfoDeclaration
|
||||
{
|
||||
TypeInfoDelegateDeclaration(Type *tinfo);
|
||||
|
||||
#if IN_DMD
|
||||
void toDt(dt_t **pdt);
|
||||
#endif
|
||||
|
||||
#if IN_LLVM
|
||||
// LDC
|
||||
void llvmDeclare();
|
||||
void llvmDefine();
|
||||
#endif
|
||||
};
|
||||
|
||||
struct TypeInfoTupleDeclaration : TypeInfoDeclaration
|
||||
{
|
||||
TypeInfoTupleDeclaration(Type *tinfo);
|
||||
|
||||
#if IN_DMD
|
||||
void toDt(dt_t **pdt);
|
||||
#endif
|
||||
|
||||
#if IN_LLVM
|
||||
// LDC
|
||||
void llvmDeclare();
|
||||
void llvmDefine();
|
||||
#endif
|
||||
};
|
||||
|
||||
#if DMDV2
|
||||
|
@ -479,22 +545,30 @@ struct TypeInfoConstDeclaration : TypeInfoDeclaration
|
|||
{
|
||||
TypeInfoConstDeclaration(Type *tinfo);
|
||||
|
||||
#if IN_DMD
|
||||
void toDt(dt_t **pdt);
|
||||
#endif
|
||||
|
||||
#if IN_LLVM
|
||||
// LDC
|
||||
void llvmDeclare();
|
||||
void llvmDefine();
|
||||
#endif
|
||||
};
|
||||
|
||||
struct TypeInfoInvariantDeclaration : TypeInfoDeclaration
|
||||
{
|
||||
TypeInfoInvariantDeclaration(Type *tinfo);
|
||||
|
||||
#if IN_DMD
|
||||
void toDt(dt_t **pdt);
|
||||
#endif
|
||||
|
||||
#if IN_LLVM
|
||||
// LDC
|
||||
void llvmDeclare();
|
||||
void llvmDefine();
|
||||
#endif
|
||||
};
|
||||
#endif
|
||||
|
||||
|
@ -578,7 +652,9 @@ struct FuncDeclaration : Declaration
|
|||
// Support for NRVO (named return value optimization)
|
||||
int nrvo_can; // !=0 means we can do it
|
||||
VarDeclaration *nrvo_var; // variable to replace with shidden
|
||||
#if IN_DMD
|
||||
Symbol *shidden; // hidden pointer passed to function
|
||||
#endif
|
||||
|
||||
#if DMDV2
|
||||
enum BUILTIN builtin; // set if this is a known, builtin
|
||||
|
@ -637,13 +713,18 @@ struct FuncDeclaration : Declaration
|
|||
static FuncDeclaration *genCfunc(Arguments *args, Type *treturn, const char *name);
|
||||
static FuncDeclaration *genCfunc(Arguments *args, Type *treturn, Identifier *id);
|
||||
|
||||
#if IN_DMD
|
||||
Symbol *toSymbol();
|
||||
Symbol *toThunkSymbol(int offset); // thunk version
|
||||
#endif
|
||||
void toObjFile(int multiobj); // compile to .obj file
|
||||
#if IN_DMD
|
||||
int cvMember(unsigned char *p);
|
||||
#endif
|
||||
|
||||
FuncDeclaration *isFuncDeclaration() { return this; }
|
||||
|
||||
#if IN_LLVM
|
||||
// LDC stuff
|
||||
|
||||
// vars declared in this function that nested funcs reference
|
||||
|
@ -666,6 +747,7 @@ struct FuncDeclaration : Declaration
|
|||
|
||||
// true if overridden with the pragma(allow_inline); stmt
|
||||
bool allowInlining;
|
||||
#endif
|
||||
};
|
||||
|
||||
struct FuncAliasDeclaration : FuncDeclaration
|
||||
|
@ -676,7 +758,9 @@ struct FuncAliasDeclaration : FuncDeclaration
|
|||
|
||||
FuncAliasDeclaration *isFuncAliasDeclaration() { return this; }
|
||||
const char *kind();
|
||||
#if IN_DMD
|
||||
Symbol *toSymbol();
|
||||
#endif
|
||||
};
|
||||
|
||||
struct FuncLiteralDeclaration : FuncDeclaration
|
||||
|
|
|
@ -39,12 +39,16 @@ Dsymbol::Dsymbol()
|
|||
this->ident = NULL;
|
||||
this->c_ident = NULL;
|
||||
this->parent = NULL;
|
||||
#if IN_DMD
|
||||
this->csym = NULL;
|
||||
this->isym = NULL;
|
||||
#endif
|
||||
this->loc = 0;
|
||||
this->comment = NULL;
|
||||
|
||||
#if IN_LLVM
|
||||
this->llvmInternal = LLVMnone;
|
||||
#endif
|
||||
}
|
||||
|
||||
Dsymbol::Dsymbol(Identifier *ident)
|
||||
|
@ -53,12 +57,16 @@ Dsymbol::Dsymbol(Identifier *ident)
|
|||
this->ident = ident;
|
||||
this->c_ident = NULL;
|
||||
this->parent = NULL;
|
||||
#if IN_DMD
|
||||
this->csym = NULL;
|
||||
this->isym = NULL;
|
||||
#endif
|
||||
this->loc = 0;
|
||||
this->comment = NULL;
|
||||
|
||||
#if IN_LLVM
|
||||
this->llvmInternal = LLVMnone;
|
||||
#endif
|
||||
}
|
||||
|
||||
int Dsymbol::equals(Object *o)
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "arraytypes.h"
|
||||
|
||||
// llvm
|
||||
#include "../ir/irsymbol.h"
|
||||
#include "../ir/irdsymbol.h"
|
||||
|
||||
struct Identifier;
|
||||
struct Scope;
|
||||
|
@ -49,7 +49,6 @@ struct UnitTestDeclaration;
|
|||
struct NewDeclaration;
|
||||
struct VarDeclaration;
|
||||
struct AttribDeclaration;
|
||||
struct Symbol;
|
||||
struct Package;
|
||||
struct Module;
|
||||
struct Import;
|
||||
|
@ -72,6 +71,10 @@ struct HdrGenState;
|
|||
struct TypeInfoDeclaration;
|
||||
struct ClassInfoDeclaration;
|
||||
|
||||
#if IN_DMD
|
||||
struct Symbol;
|
||||
#endif
|
||||
|
||||
#if IN_GCC
|
||||
union tree_node;
|
||||
typedef union tree_node TYPE;
|
||||
|
@ -104,8 +107,10 @@ struct Dsymbol : Object
|
|||
Identifier *ident;
|
||||
Identifier *c_ident;
|
||||
Dsymbol *parent;
|
||||
#if IN_DMD
|
||||
Symbol *csym; // symbol for code generator
|
||||
Symbol *isym; // import version of csym
|
||||
#endif
|
||||
unsigned char *comment; // documentation comment for this Dsymbol
|
||||
Loc loc; // where defined
|
||||
|
||||
|
@ -171,16 +176,20 @@ struct Dsymbol : Object
|
|||
virtual void emitComment(Scope *sc);
|
||||
void emitDitto(Scope *sc);
|
||||
|
||||
#if IN_DMD
|
||||
// Backend
|
||||
|
||||
virtual Symbol *toSymbol(); // to backend symbol
|
||||
#endif
|
||||
virtual void toObjFile(int multiobj); // compile to .obj file
|
||||
#if IN_DMD
|
||||
virtual int cvMember(unsigned char *p); // emit cv debug info for member
|
||||
|
||||
Symbol *toImport(); // to backend import symbol
|
||||
static Symbol *toImport(Symbol *s); // to backend import symbol
|
||||
|
||||
Symbol *toSymbolX(const char *prefix, int sclass, TYPE *t, const char *suffix); // helper
|
||||
#endif
|
||||
|
||||
// Eliminate need for dynamic_cast
|
||||
virtual Package *isPackage() { return NULL; }
|
||||
|
@ -222,10 +231,12 @@ struct Dsymbol : Object
|
|||
virtual TypeInfoDeclaration* isTypeInfoDeclaration() { return NULL; }
|
||||
virtual ClassInfoDeclaration* isClassInfoDeclaration() { return NULL; }
|
||||
|
||||
#if IN_LLVM
|
||||
// llvm stuff
|
||||
int llvmInternal;
|
||||
|
||||
IrDsymbol ir;
|
||||
#endif
|
||||
};
|
||||
|
||||
// Dsymbol that generates a scope
|
||||
|
|
|
@ -27,7 +27,9 @@ EnumDeclaration::EnumDeclaration(Loc loc, Identifier *id, Type *memtype)
|
|||
maxval = 0;
|
||||
minval = 0;
|
||||
defaultval = 0;
|
||||
#if IN_DMD
|
||||
sinit = NULL;
|
||||
#endif
|
||||
isdeprecated = 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -65,8 +65,10 @@ struct EnumDeclaration : ScopeDsymbol
|
|||
void toDebug();
|
||||
int cvMember(unsigned char *p);
|
||||
|
||||
#if IN_DMD
|
||||
Symbol *sinit;
|
||||
Symbol *toInitializer();
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -3075,7 +3075,9 @@ StructLiteralExp::StructLiteralExp(Loc loc, StructDeclaration *sd, Expressions *
|
|||
{
|
||||
this->sd = sd;
|
||||
this->elements = elements;
|
||||
#if IN_DMD
|
||||
this->sym = NULL;
|
||||
#endif
|
||||
this->soffset = 0;
|
||||
this->fillHoles = 1;
|
||||
}
|
||||
|
|
|
@ -42,29 +42,32 @@ struct ClassDeclaration;
|
|||
struct HdrGenState;
|
||||
struct BinExp;
|
||||
struct InterState;
|
||||
struct Symbol; // back end symbol
|
||||
struct OverloadSet;
|
||||
namespace llvm
|
||||
{
|
||||
class Constant;
|
||||
class ConstantInt;
|
||||
}
|
||||
|
||||
enum TOK;
|
||||
|
||||
// Back end
|
||||
struct IRState;
|
||||
|
||||
#if IN_DMD
|
||||
struct dt_t;
|
||||
struct elem;
|
||||
struct Symbol; // back end symbol
|
||||
#endif
|
||||
|
||||
#ifdef IN_GCC
|
||||
union tree_node; typedef union tree_node elem;
|
||||
#endif
|
||||
|
||||
#if IN_LLVM
|
||||
struct DValue;
|
||||
typedef DValue elem;
|
||||
#else
|
||||
#ifdef IN_GCC
|
||||
union tree_node; typedef union tree_node elem;
|
||||
#else
|
||||
struct elem;
|
||||
#endif
|
||||
|
||||
namespace llvm
|
||||
{
|
||||
class Constant;
|
||||
class ConstantInt;
|
||||
}
|
||||
#endif
|
||||
|
||||
void initPrecedence();
|
||||
|
@ -159,9 +162,12 @@ struct Expression : Object
|
|||
|
||||
// Back end
|
||||
virtual elem *toElem(IRState *irs);
|
||||
#if IN_DMD
|
||||
virtual dt_t **toDt(dt_t **pdt);
|
||||
#elif IN_LLVM
|
||||
// LDC
|
||||
virtual llvm::Constant *toConstElem(IRState *irs);
|
||||
#endif
|
||||
};
|
||||
|
||||
struct IntegerExp : Expression
|
||||
|
@ -186,9 +192,12 @@ struct IntegerExp : Expression
|
|||
void toMangleBuffer(OutBuffer *buf);
|
||||
Expression *toLvalue(Scope *sc, Expression *e);
|
||||
elem *toElem(IRState *irs);
|
||||
#if IN_DMD
|
||||
dt_t **toDt(dt_t **pdt);
|
||||
#elif IN_LLVM
|
||||
// LDC
|
||||
virtual llvm::Constant *toConstElem(IRState *irs);
|
||||
#endif
|
||||
};
|
||||
|
||||
struct RealExp : Expression
|
||||
|
@ -211,9 +220,12 @@ struct RealExp : Expression
|
|||
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
|
||||
void toMangleBuffer(OutBuffer *buf);
|
||||
elem *toElem(IRState *irs);
|
||||
#if IN_DMD
|
||||
dt_t **toDt(dt_t **pdt);
|
||||
#elif IN_LLVM
|
||||
// LDC
|
||||
virtual llvm::Constant *toConstElem(IRState *irs);
|
||||
#endif
|
||||
};
|
||||
|
||||
struct ComplexExp : Expression
|
||||
|
@ -239,9 +251,12 @@ struct ComplexExp : Expression
|
|||
OutBuffer hexp;
|
||||
#endif
|
||||
elem *toElem(IRState *irs);
|
||||
#if IN_DMD
|
||||
dt_t **toDt(dt_t **pdt);
|
||||
#elif IN_LLVM
|
||||
// LDC
|
||||
virtual llvm::Constant *toConstElem(IRState *irs);
|
||||
#endif
|
||||
};
|
||||
|
||||
struct IdentifierExp : Expression
|
||||
|
@ -318,9 +333,12 @@ struct NullExp : Expression
|
|||
Expression *castTo(Scope *sc, Type *t);
|
||||
Expression *interpret(InterState *istate);
|
||||
elem *toElem(IRState *irs);
|
||||
#if IN_DMD
|
||||
dt_t **toDt(dt_t **pdt);
|
||||
#elif IN_LLVM
|
||||
// LDC
|
||||
virtual llvm::Constant *toConstElem(IRState *irs);
|
||||
#endif
|
||||
};
|
||||
|
||||
struct StringExp : Expression
|
||||
|
@ -348,9 +366,12 @@ struct StringExp : Expression
|
|||
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
|
||||
void toMangleBuffer(OutBuffer *buf);
|
||||
elem *toElem(IRState *irs);
|
||||
#if IN_DMD
|
||||
dt_t **toDt(dt_t **pdt);
|
||||
#elif IN_LLVM
|
||||
// LDC
|
||||
virtual llvm::Constant *toConstElem(IRState *irs);
|
||||
#endif
|
||||
};
|
||||
|
||||
// Tuple
|
||||
|
@ -397,13 +418,16 @@ struct ArrayLiteralExp : Expression
|
|||
Expression *interpret(InterState *istate);
|
||||
MATCH implicitConvTo(Type *t);
|
||||
Expression *castTo(Scope *sc, Type *t);
|
||||
#if IN_DMD
|
||||
dt_t **toDt(dt_t **pdt);
|
||||
#elif IN_LLVM
|
||||
// LDC
|
||||
virtual llvm::Constant *toConstElem(IRState *irs);
|
||||
#endif
|
||||
|
||||
int inlineCost(InlineCostState *ics);
|
||||
Expression *doInline(InlineDoState *ids);
|
||||
Expression *inlineScan(InlineScanState *iss);
|
||||
// LDC
|
||||
virtual llvm::Constant *toConstElem(IRState *irs);
|
||||
};
|
||||
|
||||
struct AssocArrayLiteralExp : Expression
|
||||
|
@ -429,8 +453,10 @@ struct AssocArrayLiteralExp : Expression
|
|||
int inlineCost(InlineCostState *ics);
|
||||
Expression *doInline(InlineDoState *ids);
|
||||
Expression *inlineScan(InlineScanState *iss);
|
||||
#if IN_LLVM
|
||||
// LDC
|
||||
virtual llvm::Constant *toConstElem(IRState *irs);
|
||||
#endif
|
||||
};
|
||||
|
||||
struct StructLiteralExp : Expression
|
||||
|
@ -439,7 +465,9 @@ struct StructLiteralExp : Expression
|
|||
Expressions *elements; // parallels sd->fields[] with
|
||||
// NULL entries for fields to skip
|
||||
|
||||
#if IN_DMD
|
||||
Symbol *sym; // back end symbol to initialize with literal
|
||||
#endif
|
||||
size_t soffset; // offset from start of s
|
||||
int fillHoles; // fill alignment 'holes' with zero
|
||||
|
||||
|
@ -456,14 +484,18 @@ struct StructLiteralExp : Expression
|
|||
void scanForNestedRef(Scope *sc);
|
||||
Expression *optimize(int result);
|
||||
Expression *interpret(InterState *istate);
|
||||
#if IN_DMD
|
||||
dt_t **toDt(dt_t **pdt);
|
||||
#elif IN_LLVM
|
||||
// LDC
|
||||
virtual llvm::Constant *toConstElem(IRState *irs);
|
||||
#endif
|
||||
Expression *toLvalue(Scope *sc, Expression *e);
|
||||
|
||||
int inlineCost(InlineCostState *ics);
|
||||
Expression *doInline(InlineDoState *ids);
|
||||
Expression *inlineScan(InlineScanState *iss);
|
||||
// LDC
|
||||
virtual llvm::Constant *toConstElem(IRState *irs);
|
||||
|
||||
};
|
||||
|
||||
struct TypeDotIdExp : Expression
|
||||
|
@ -570,7 +602,9 @@ struct SymOffExp : Expression
|
|||
void scanForNestedRef(Scope *sc);
|
||||
|
||||
elem *toElem(IRState *irs);
|
||||
#if IN_DMD
|
||||
dt_t **toDt(dt_t **pdt);
|
||||
#endif
|
||||
};
|
||||
|
||||
// Variable
|
||||
|
@ -591,14 +625,17 @@ struct VarExp : Expression
|
|||
Expression *toLvalue(Scope *sc, Expression *e);
|
||||
Expression *modifiableLvalue(Scope *sc, Expression *e);
|
||||
elem *toElem(IRState *irs);
|
||||
#if IN_DMD
|
||||
dt_t **toDt(dt_t **pdt);
|
||||
#elif IN_LLVM
|
||||
// LDC
|
||||
virtual llvm::Constant *toConstElem(IRState *irs);
|
||||
#endif
|
||||
void scanForNestedRef(Scope *sc);
|
||||
|
||||
int inlineCost(InlineCostState *ics);
|
||||
Expression *doInline(InlineDoState *ids);
|
||||
//Expression *inlineScan(InlineScanState *iss);
|
||||
// LDC
|
||||
virtual llvm::Constant *toConstElem(IRState *irs);
|
||||
};
|
||||
|
||||
#if DMDV2
|
||||
|
|
|
@ -76,11 +76,15 @@ FuncDeclaration::FuncDeclaration(Loc loc, Loc endloc, Identifier *id, enum STC s
|
|||
hasReturnExp = 0;
|
||||
nrvo_can = 1;
|
||||
nrvo_var = NULL;
|
||||
#if IN_DMD
|
||||
shidden = NULL;
|
||||
#endif
|
||||
|
||||
#if IN_LLVM
|
||||
// LDC
|
||||
isArrayOp = false;
|
||||
allowInlining = false;
|
||||
#endif
|
||||
}
|
||||
|
||||
Dsymbol *FuncDeclaration::syntaxCopy(Dsymbol *s)
|
||||
|
|
10
dmd/init.h
10
dmd/init.h
|
@ -44,7 +44,9 @@ struct Initializer : Object
|
|||
|
||||
static Initializers *arraySyntaxCopy(Initializers *ai);
|
||||
|
||||
#if IN_DMD
|
||||
virtual dt_t *toDt();
|
||||
#endif
|
||||
|
||||
virtual VoidInitializer *isVoidInitializer() { return NULL; }
|
||||
virtual StructInitializer *isStructInitializer() { return NULL; }
|
||||
|
@ -62,7 +64,9 @@ struct VoidInitializer : Initializer
|
|||
Expression *toExpression();
|
||||
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
|
||||
|
||||
#if IN_DMD
|
||||
dt_t *toDt();
|
||||
#endif
|
||||
|
||||
virtual VoidInitializer *isVoidInitializer() { return this; }
|
||||
};
|
||||
|
@ -82,7 +86,9 @@ struct StructInitializer : Initializer
|
|||
Expression *toExpression();
|
||||
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
|
||||
|
||||
#if IN_DMD
|
||||
dt_t *toDt();
|
||||
#endif
|
||||
|
||||
StructInitializer *isStructInitializer() { return this; }
|
||||
};
|
||||
|
@ -104,8 +110,10 @@ struct ArrayInitializer : Initializer
|
|||
Initializer *toAssocArrayInitializer();
|
||||
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
|
||||
|
||||
#if IN_DMD
|
||||
dt_t *toDt();
|
||||
dt_t *toDtBit(); // for bit arrays
|
||||
#endif
|
||||
|
||||
ArrayInitializer *isArrayInitializer() { return this; }
|
||||
};
|
||||
|
@ -121,7 +129,9 @@ struct ExpInitializer : Initializer
|
|||
Expression *toExpression();
|
||||
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
|
||||
|
||||
#if IN_DMD
|
||||
dt_t *toDt();
|
||||
#endif
|
||||
|
||||
virtual ExpInitializer *isExpInitializer() { return this; }
|
||||
};
|
||||
|
|
|
@ -551,8 +551,10 @@ Expression *DeclarationExp::doInline(InlineDoState *ids)
|
|||
vto = new VarDeclaration(vd->loc, vd->type, vd->ident, vd->init);
|
||||
*vto = *vd;
|
||||
vto->parent = ids->parent;
|
||||
#if IN_DMD
|
||||
vto->csym = NULL;
|
||||
vto->isym = NULL;
|
||||
#endif
|
||||
|
||||
ids->from.push(vd);
|
||||
ids->to.push(vto);
|
||||
|
@ -645,8 +647,10 @@ Expression *IndexExp::doInline(InlineDoState *ids)
|
|||
vto = new VarDeclaration(vd->loc, vd->type, vd->ident, vd->init);
|
||||
*vto = *vd;
|
||||
vto->parent = ids->parent;
|
||||
#if IN_DMD
|
||||
vto->csym = NULL;
|
||||
vto->isym = NULL;
|
||||
#endif
|
||||
|
||||
ids->from.push(vd);
|
||||
ids->to.push(vto);
|
||||
|
@ -682,8 +686,10 @@ Expression *SliceExp::doInline(InlineDoState *ids)
|
|||
vto = new VarDeclaration(vd->loc, vd->type, vd->ident, vd->init);
|
||||
*vto = *vd;
|
||||
vto->parent = ids->parent;
|
||||
#if IN_DMD
|
||||
vto->csym = NULL;
|
||||
vto->isym = NULL;
|
||||
#endif
|
||||
|
||||
ids->from.push(vd);
|
||||
ids->to.push(vto);
|
||||
|
|
|
@ -97,6 +97,7 @@ Module::Module(char *filename, Identifier *ident, int doDocComment, int doHdrGen
|
|||
semanticdone = 0;
|
||||
decldefs = NULL;
|
||||
vmoduleinfo = NULL;
|
||||
#if IN_DMD
|
||||
massert = NULL;
|
||||
marray = NULL;
|
||||
sictor = NULL;
|
||||
|
@ -104,6 +105,7 @@ Module::Module(char *filename, Identifier *ident, int doDocComment, int doHdrGen
|
|||
sdtor = NULL;
|
||||
stest = NULL;
|
||||
sfilename = NULL;
|
||||
#endif
|
||||
root = 0;
|
||||
importedFrom = NULL;
|
||||
srcfile = NULL;
|
||||
|
@ -120,9 +122,11 @@ Module::Module(char *filename, Identifier *ident, int doDocComment, int doHdrGen
|
|||
|
||||
macrotable = NULL;
|
||||
escapetable = NULL;
|
||||
#if IN_DMD
|
||||
doppelganger = 0;
|
||||
cov = NULL;
|
||||
covb = NULL;
|
||||
#endif
|
||||
|
||||
srcfilename = FileName::defaultExt(filename, global.mars_ext);
|
||||
if (!srcfilename->equalsExt(global.mars_ext) &&
|
||||
|
|
|
@ -32,6 +32,7 @@ struct DValue;
|
|||
typedef DValue elem;
|
||||
namespace llvm { class Module; }
|
||||
#else
|
||||
|
||||
#ifdef IN_GCC
|
||||
union tree_node; typedef union tree_node elem;
|
||||
#else
|
||||
|
@ -147,7 +148,7 @@ struct Module : Package
|
|||
int imports(Module *m);
|
||||
|
||||
// Back end
|
||||
|
||||
#if IN_DMD
|
||||
int doppelganger; // sub-module
|
||||
Symbol *cov; // private uint[] __coverage;
|
||||
unsigned *covb; // bit array of valid code line numbers
|
||||
|
@ -171,6 +172,7 @@ struct Module : Package
|
|||
elem *toEmodulename();
|
||||
|
||||
Symbol *toSymbol();
|
||||
#endif
|
||||
void genmoduleinfo();
|
||||
|
||||
// LDC
|
||||
|
|
|
@ -130,7 +130,9 @@ Type::Type(TY ty, Type *next)
|
|||
this->rto = NULL;
|
||||
this->arrayof = NULL;
|
||||
this->vtinfo = NULL;
|
||||
#if IN_DMD
|
||||
this->ctype = NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
Type *Type::syntaxCopy()
|
||||
|
|
49
dmd/mtype.h
49
dmd/mtype.h
|
@ -21,10 +21,12 @@
|
|||
#include "arraytypes.h"
|
||||
#include "expression.h"
|
||||
|
||||
#if IN_LLVM
|
||||
// llvm
|
||||
#include "../ir/irtype.h"
|
||||
#include "../ir/irfuncty.h"
|
||||
namespace llvm { class Type; }
|
||||
#endif
|
||||
|
||||
struct Scope;
|
||||
struct Identifier;
|
||||
|
@ -48,10 +50,12 @@ struct Argument;
|
|||
#if IN_GCC
|
||||
union tree_node; typedef union tree_node TYPE;
|
||||
typedef TYPE type;
|
||||
#else
|
||||
typedef struct TYPE type;
|
||||
#endif
|
||||
|
||||
#if IN_DMD
|
||||
typedef struct TYPE type;
|
||||
struct Symbol;
|
||||
#endif
|
||||
|
||||
enum TY
|
||||
{
|
||||
|
@ -126,7 +130,9 @@ struct Type : Object
|
|||
Type *arrayof; // array of this type
|
||||
TypeInfoDeclaration *vtinfo; // TypeInfo object for this Type
|
||||
|
||||
#if IN_DMD
|
||||
type *ctype; // for back end
|
||||
#endif
|
||||
|
||||
#define tvoid basic[Tvoid]
|
||||
#define tint8 basic[Tint8]
|
||||
|
@ -236,7 +242,9 @@ struct Type : Object
|
|||
virtual unsigned memalign(unsigned salign);
|
||||
virtual Expression *defaultInit(Loc loc = 0);
|
||||
virtual int isZeroInit(); // if initializer is 0
|
||||
#if IN_DMD
|
||||
virtual dt_t **toDt(dt_t **pdt);
|
||||
#endif
|
||||
Identifier *getTypeInfoIdent(int internal);
|
||||
virtual MATCH deduceType(Scope *sc, Type *tparam, TemplateParameters *parameters, Objects *dedtypes);
|
||||
virtual void resolve(Loc loc, Scope *sc, Expression **pe, Type **pt, Dsymbol **ps);
|
||||
|
@ -253,17 +261,21 @@ struct Type : Object
|
|||
static void error(Loc loc, const char *format, ...);
|
||||
static void warning(Loc loc, const char *format, ...);
|
||||
|
||||
#if IN_DMD
|
||||
// For backend
|
||||
virtual unsigned totym();
|
||||
virtual type *toCtype();
|
||||
virtual type *toCParamtype();
|
||||
virtual Symbol *toSymbol();
|
||||
#endif
|
||||
|
||||
// For eliminating dynamic_cast
|
||||
virtual TypeBasic *isTypeBasic();
|
||||
|
||||
#if IN_LLVM
|
||||
// LDC
|
||||
IrType ir;
|
||||
#endif
|
||||
};
|
||||
|
||||
struct TypeBasic : Type
|
||||
|
@ -322,15 +334,19 @@ struct TypeSArray : TypeArray
|
|||
unsigned memalign(unsigned salign);
|
||||
MATCH implicitConvTo(Type *to);
|
||||
Expression *defaultInit(Loc loc);
|
||||
#if IN_DMD
|
||||
dt_t **toDt(dt_t **pdt);
|
||||
dt_t **toDtElem(dt_t **pdt, Expression *e);
|
||||
#endif
|
||||
MATCH deduceType(Scope *sc, Type *tparam, TemplateParameters *parameters, Objects *dedtypes);
|
||||
TypeInfoDeclaration *getTypeInfoDeclaration();
|
||||
Expression *toExpression();
|
||||
int hasPointers();
|
||||
|
||||
#if IN_DMD
|
||||
type *toCtype();
|
||||
type *toCParamtype();
|
||||
#endif
|
||||
};
|
||||
|
||||
// Dynamic array, no dimension
|
||||
|
@ -353,7 +369,9 @@ struct TypeDArray : TypeArray
|
|||
TypeInfoDeclaration *getTypeInfoDeclaration();
|
||||
int hasPointers();
|
||||
|
||||
#if IN_DMD
|
||||
type *toCtype();
|
||||
#endif
|
||||
};
|
||||
|
||||
struct TypeAArray : TypeArray
|
||||
|
@ -376,10 +394,12 @@ struct TypeAArray : TypeArray
|
|||
TypeInfoDeclaration *getTypeInfoDeclaration();
|
||||
int hasPointers();
|
||||
|
||||
#if IN_DMD
|
||||
// Back end
|
||||
Symbol *aaGetSymbol(const char *func, int flags);
|
||||
|
||||
type *toCtype();
|
||||
#endif
|
||||
};
|
||||
|
||||
struct TypePointer : Type
|
||||
|
@ -398,7 +418,9 @@ struct TypePointer : Type
|
|||
TypeInfoDeclaration *getTypeInfoDeclaration();
|
||||
int hasPointers();
|
||||
|
||||
#if IN_DMD
|
||||
type *toCtype();
|
||||
#endif
|
||||
};
|
||||
|
||||
struct TypeReference : Type
|
||||
|
@ -438,13 +460,18 @@ struct TypeFunction : Type
|
|||
Type *reliesOnTident();
|
||||
|
||||
int callMatch(Expressions *toargs);
|
||||
#if IN_DMD
|
||||
type *toCtype();
|
||||
#endif
|
||||
|
||||
enum RET retStyle();
|
||||
|
||||
#if IN_DMD
|
||||
unsigned totym();
|
||||
|
||||
#elif IN_LLVM
|
||||
// LDC
|
||||
IrFuncTy fty;
|
||||
#endif
|
||||
};
|
||||
|
||||
struct TypeDelegate : Type
|
||||
|
@ -462,7 +489,9 @@ struct TypeDelegate : Type
|
|||
Expression *dotExp(Scope *sc, Expression *e, Identifier *ident);
|
||||
int hasPointers();
|
||||
|
||||
#if IN_DMD
|
||||
type *toCtype();
|
||||
#endif
|
||||
};
|
||||
|
||||
struct TypeQualified : Type
|
||||
|
@ -543,17 +572,21 @@ struct TypeStruct : Type
|
|||
Expression *defaultInit(Loc loc);
|
||||
int isZeroInit();
|
||||
int checkBoolean();
|
||||
#if IN_DMD
|
||||
dt_t **toDt(dt_t **pdt);
|
||||
#endif
|
||||
MATCH deduceType(Scope *sc, Type *tparam, TemplateParameters *parameters, Objects *dedtypes);
|
||||
TypeInfoDeclaration *getTypeInfoDeclaration();
|
||||
int hasPointers();
|
||||
|
||||
#if IN_DMD
|
||||
type *toCtype();
|
||||
|
||||
#elif IN_LLVM
|
||||
// LDC
|
||||
// cache the hasUnalignedFields check
|
||||
// 0 = not checked, 1 = aligned, 2 = unaligned
|
||||
int unaligned;
|
||||
#endif
|
||||
};
|
||||
|
||||
struct TypeEnum : Type
|
||||
|
@ -583,7 +616,9 @@ struct TypeEnum : Type
|
|||
TypeInfoDeclaration *getTypeInfoDeclaration();
|
||||
int hasPointers();
|
||||
|
||||
#if IN_DMD
|
||||
type *toCtype();
|
||||
#endif
|
||||
};
|
||||
|
||||
struct TypeTypedef : Type
|
||||
|
@ -614,13 +649,17 @@ struct TypeTypedef : Type
|
|||
MATCH implicitConvTo(Type *to);
|
||||
Expression *defaultInit(Loc loc);
|
||||
int isZeroInit();
|
||||
#if IN_DMD
|
||||
dt_t **toDt(dt_t **pdt);
|
||||
#endif
|
||||
MATCH deduceType(Scope *sc, Type *tparam, TemplateParameters *parameters, Objects *dedtypes);
|
||||
TypeInfoDeclaration *getTypeInfoDeclaration();
|
||||
int hasPointers();
|
||||
|
||||
#if IN_DMD
|
||||
type *toCtype();
|
||||
type *toCParamtype();
|
||||
#endif
|
||||
};
|
||||
|
||||
struct TypeClass : Type
|
||||
|
@ -647,9 +686,11 @@ struct TypeClass : Type
|
|||
TypeInfoDeclaration *getTypeInfoDeclaration();
|
||||
int hasPointers();
|
||||
|
||||
#if IN_DMD
|
||||
type *toCtype();
|
||||
|
||||
Symbol *toSymbol();
|
||||
#endif
|
||||
};
|
||||
|
||||
struct TypeTuple : Type
|
||||
|
|
|
@ -41,8 +41,10 @@ AggregateDeclaration::AggregateDeclaration(Loc loc, Identifier *id)
|
|||
aggNew = NULL;
|
||||
aggDelete = NULL;
|
||||
|
||||
#if IN_DMD
|
||||
stag = NULL;
|
||||
sinit = NULL;
|
||||
#endif
|
||||
scope = NULL;
|
||||
#if V2
|
||||
dtor = NULL;
|
||||
|
|
|
@ -363,14 +363,18 @@ void TemplateDeclaration::semantic(Scope *sc)
|
|||
{
|
||||
// Generate this function as it may be used
|
||||
// when template is instantiated in other modules
|
||||
sc->module->toModuleArray();
|
||||
|
||||
// FIXME: LDC
|
||||
//sc->module->toModuleArray();
|
||||
}
|
||||
|
||||
if (/*global.params.useAssert &&*/ sc->module)
|
||||
{
|
||||
// Generate this function as it may be used
|
||||
// when template is instantiated in other modules
|
||||
sc->module->toModuleAssert();
|
||||
|
||||
// FIXME: LDC
|
||||
//sc->module->toModuleAssert();
|
||||
}
|
||||
|
||||
/* Remember Scope for later instantiations, but make
|
||||
|
|
208
gen/tocsym.cpp
208
gen/tocsym.cpp
|
@ -1,208 +0,0 @@
|
|||
|
||||
// Copyright (c) 1999-2005 by Digital Mars
|
||||
// All Rights Reserved
|
||||
// written by Walter Bright
|
||||
// www.digitalmars.com
|
||||
// License for redistribution is by either the Artistic License
|
||||
// in artistic.txt, or the GNU General Public License in gnu.txt.
|
||||
// See the included readme.txt for details.
|
||||
|
||||
// stubbed out for dmdfe. Original is in dmd/tocsym.c
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include "mars.h"
|
||||
#include "module.h"
|
||||
#include "mtype.h"
|
||||
#include "declaration.h"
|
||||
#include "statement.h"
|
||||
#include "enum.h"
|
||||
#include "aggregate.h"
|
||||
#include "init.h"
|
||||
#include "attrib.h"
|
||||
#include "lexer.h"
|
||||
|
||||
|
||||
Symbol *StaticStructInitDeclaration::toSymbol()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*************************************
|
||||
* Helper
|
||||
*/
|
||||
|
||||
Symbol *Dsymbol::toSymbolX(const char *prefix, int sclass, TYPE *t, const char *suffix)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*************************************
|
||||
*/
|
||||
|
||||
Symbol *Dsymbol::toSymbol()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*********************************
|
||||
* Generate import symbol from symbol.
|
||||
*/
|
||||
|
||||
Symbol *Dsymbol::toImport()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*************************************
|
||||
*/
|
||||
|
||||
Symbol *Dsymbol::toImport(Symbol *sym)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*************************************
|
||||
*/
|
||||
|
||||
Symbol *VarDeclaration::toSymbol()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*************************************
|
||||
*/
|
||||
|
||||
Symbol *ClassInfoDeclaration::toSymbol()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*************************************
|
||||
*/
|
||||
|
||||
Symbol *ModuleInfoDeclaration::toSymbol()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*************************************
|
||||
*/
|
||||
|
||||
Symbol *TypeInfoDeclaration::toSymbol()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*************************************
|
||||
*/
|
||||
|
||||
Symbol *FuncDeclaration::toSymbol()
|
||||
{
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*************************************
|
||||
*/
|
||||
|
||||
Symbol *FuncDeclaration::toThunkSymbol(int offset)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*************************************
|
||||
*/
|
||||
|
||||
Symbol *FuncAliasDeclaration::toSymbol()
|
||||
{
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/****************************************
|
||||
* Create a static symbol we can hang DT initializers onto.
|
||||
*/
|
||||
|
||||
Symbol *static_sym()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*************************************
|
||||
* Create the "ClassInfo" symbol
|
||||
*/
|
||||
|
||||
Symbol *ClassDeclaration::toSymbol()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*************************************
|
||||
* Create the "InterfaceInfo" symbol
|
||||
*/
|
||||
|
||||
Symbol *InterfaceDeclaration::toSymbol()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*************************************
|
||||
* Create the "ModuleInfo" symbol
|
||||
*/
|
||||
|
||||
Symbol *Module::toSymbol()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*************************************
|
||||
* This is accessible via the ClassData, but since it is frequently
|
||||
* needed directly (like for rtti comparisons), make it directly accessible.
|
||||
*/
|
||||
|
||||
Symbol *ClassDeclaration::toVtblSymbol()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**********************************
|
||||
* Create the static initializer for the struct/class.
|
||||
*/
|
||||
|
||||
Symbol *AggregateDeclaration::toInitializer()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/******************************************
|
||||
*/
|
||||
|
||||
Symbol *Module::toModuleAssert()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/******************************************
|
||||
*/
|
||||
|
||||
Symbol *Module::toModuleArray()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/********************************************
|
||||
* Determine the right symbol to look up
|
||||
* an associative array element.
|
||||
* Input:
|
||||
* flags 0 don't add value signature
|
||||
* 1 add value signature
|
||||
*/
|
||||
|
||||
Symbol *TypeAArray::aaGetSymbol(const char *func, int flags)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
140
gen/todt.cpp
140
gen/todt.cpp
|
@ -1,140 +0,0 @@
|
|||
|
||||
// Copyright (c) 1999-2005 by Digital Mars
|
||||
// All Rights Reserved
|
||||
// written by Walter Bright
|
||||
// www.digitalmars.com
|
||||
// License for redistribution is by either the Artistic License
|
||||
// in artistic.txt, or the GNU General Public License in gnu.txt.
|
||||
// See the included readme.txt for details.
|
||||
|
||||
// stubbed out for dmdfe. Original is in dmd/todt.c
|
||||
|
||||
#include "lexer.h"
|
||||
#include "mtype.h"
|
||||
#include "expression.h"
|
||||
#include "init.h"
|
||||
#include "enum.h"
|
||||
#include "aggregate.h"
|
||||
#include "declaration.h"
|
||||
|
||||
struct dt_t {};
|
||||
|
||||
dt_t *Initializer::toDt()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
dt_t *StructInitializer::toDt()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
dt_t *ArrayInitializer::toDt()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
dt_t *ArrayInitializer::toDtBit()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
dt_t *ExpInitializer::toDt()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
dt_t *VoidInitializer::toDt()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* ================================================================ */
|
||||
|
||||
dt_t **Expression::toDt(dt_t **pdt)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
dt_t **IntegerExp::toDt(dt_t **pdt)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
dt_t **RealExp::toDt(dt_t **pdt)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
dt_t **ComplexExp::toDt(dt_t **pdt)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
dt_t **NullExp::toDt(dt_t **pdt)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
dt_t **StringExp::toDt(dt_t **pdt)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
dt_t **SymOffExp::toDt(dt_t **pdt)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
dt_t **VarExp::toDt(dt_t **pdt)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
dt_t **ArrayLiteralExp::toDt(dt_t **pdt)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
dt_t **StructLiteralExp::toDt(dt_t **pdt)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ClassDeclaration::toDt(dt_t **pdt)
|
||||
{
|
||||
}
|
||||
|
||||
void ClassDeclaration::toDt2(dt_t **pdt, ClassDeclaration *cd)
|
||||
{
|
||||
}
|
||||
|
||||
void StructDeclaration::toDt(dt_t **pdt)
|
||||
{
|
||||
}
|
||||
|
||||
dt_t **Type::toDt(dt_t **pdt)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
dt_t **TypeSArray::toDt(dt_t **pdt)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
dt_t **TypeStruct::toDt(dt_t **pdt)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
dt_t **TypeTypedef::toDt(dt_t **pdt)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
159
gen/toir.cpp
159
gen/toir.cpp
|
@ -2618,164 +2618,7 @@ CONSTSTUB(SliceExp);
|
|||
CONSTSTUB(IndexExp);
|
||||
CONSTSTUB(AssocArrayLiteralExp);
|
||||
|
||||
unsigned Type::totym() { return 0; }
|
||||
|
||||
type * Type::toCtype()
|
||||
{
|
||||
assert(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
type * Type::toCParamtype()
|
||||
{
|
||||
assert(0);
|
||||
return 0;
|
||||
}
|
||||
Symbol * Type::toSymbol()
|
||||
{
|
||||
assert(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
type *
|
||||
TypeTypedef::toCtype()
|
||||
{
|
||||
assert(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
type *
|
||||
TypeTypedef::toCParamtype()
|
||||
{
|
||||
assert(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
TypedefDeclaration::toDebug()
|
||||
{
|
||||
assert(0);
|
||||
}
|
||||
|
||||
|
||||
type *
|
||||
TypeEnum::toCtype()
|
||||
{
|
||||
assert(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
type *
|
||||
TypeStruct::toCtype()
|
||||
{
|
||||
assert(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
StructDeclaration::toDebug()
|
||||
{
|
||||
assert(0);
|
||||
}
|
||||
|
||||
Symbol * TypeClass::toSymbol()
|
||||
{
|
||||
assert(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned TypeFunction::totym()
|
||||
{
|
||||
assert(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
type * TypeFunction::toCtype()
|
||||
{
|
||||
assert(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
type * TypeSArray::toCtype()
|
||||
{
|
||||
assert(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
type *TypeSArray::toCParamtype()
|
||||
{
|
||||
assert(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
type * TypeDArray::toCtype()
|
||||
{
|
||||
assert(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
type * TypeAArray::toCtype()
|
||||
{
|
||||
assert(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
type * TypePointer::toCtype()
|
||||
{
|
||||
assert(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
type * TypeDelegate::toCtype()
|
||||
{
|
||||
assert(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
type * TypeClass::toCtype()
|
||||
{
|
||||
assert(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ClassDeclaration::toDebug()
|
||||
{
|
||||
assert(0);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void
|
||||
EnumDeclaration::toDebug()
|
||||
{
|
||||
assert(0);
|
||||
}
|
||||
|
||||
int Dsymbol::cvMember(unsigned char*)
|
||||
{
|
||||
assert(0);
|
||||
return 0;
|
||||
}
|
||||
int EnumDeclaration::cvMember(unsigned char*)
|
||||
{
|
||||
assert(0);
|
||||
return 0;
|
||||
}
|
||||
int FuncDeclaration::cvMember(unsigned char*)
|
||||
{
|
||||
assert(0);
|
||||
return 0;
|
||||
}
|
||||
int VarDeclaration::cvMember(unsigned char*)
|
||||
{
|
||||
assert(0);
|
||||
return 0;
|
||||
}
|
||||
int TypedefDeclaration::cvMember(unsigned char*)
|
||||
{
|
||||
assert(0);
|
||||
return 0;
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void obj_includelib(const char* lib)
|
||||
{
|
||||
|
|
|
@ -827,16 +827,6 @@ void ClassDeclaration::toObjFile(int multiobj)
|
|||
gIR->resolveList.push_back(this);
|
||||
}
|
||||
|
||||
/******************************************
|
||||
* Get offset of base class's vtbl[] initializer from start of csym.
|
||||
* Returns ~0 if not this csym.
|
||||
*/
|
||||
|
||||
unsigned ClassDeclaration::baseVtblOffset(BaseClass *bc)
|
||||
{
|
||||
return ~0;
|
||||
}
|
||||
|
||||
/* ================================================================== */
|
||||
|
||||
void TupleDeclaration::toObjFile(int multiobj)
|
||||
|
|
101
gen/typinf.cpp
101
gen/typinf.cpp
|
@ -352,11 +352,6 @@ void DtoDefineTypeInfo(TypeInfoDeclaration* tid)
|
|||
|
||||
/* ========================================================================= */
|
||||
|
||||
void TypeInfoDeclaration::toDt(dt_t **pdt)
|
||||
{
|
||||
assert(0 && "TypeInfoDeclaration::toDt");
|
||||
}
|
||||
|
||||
void TypeInfoDeclaration::llvmDeclare()
|
||||
{
|
||||
assert(0 && "TypeInfoDeclaration::llvmDeclare");
|
||||
|
@ -438,11 +433,6 @@ void TypeInfoTypedefDeclaration::llvmDefine()
|
|||
isaGlobalVar(ir.irGlobal->value)->setInitializer(tiInit);
|
||||
}
|
||||
|
||||
void TypeInfoTypedefDeclaration::toDt(dt_t **pdt)
|
||||
{
|
||||
assert(0);
|
||||
}
|
||||
|
||||
/* ========================================================================= */
|
||||
|
||||
void TypeInfoEnumDeclaration::llvmDeclare()
|
||||
|
@ -516,11 +506,6 @@ void TypeInfoEnumDeclaration::llvmDefine()
|
|||
isaGlobalVar(ir.irGlobal->value)->setInitializer(tiInit);
|
||||
}
|
||||
|
||||
void TypeInfoEnumDeclaration::toDt(dt_t **pdt)
|
||||
{
|
||||
assert(0);
|
||||
}
|
||||
|
||||
/* ========================================================================= */
|
||||
|
||||
static void LLVM_D_Declare_TypeInfoBase(TypeInfoDeclaration* tid, ClassDeclaration* cd)
|
||||
|
@ -582,11 +567,6 @@ void TypeInfoPointerDeclaration::llvmDefine()
|
|||
LLVM_D_Define_TypeInfoBase(tc->next, this, Type::typeinfopointer);
|
||||
}
|
||||
|
||||
void TypeInfoPointerDeclaration::toDt(dt_t **pdt)
|
||||
{
|
||||
assert(0);
|
||||
}
|
||||
|
||||
/* ========================================================================= */
|
||||
|
||||
void TypeInfoArrayDeclaration::llvmDeclare()
|
||||
|
@ -611,16 +591,11 @@ void TypeInfoArrayDeclaration::llvmDefine()
|
|||
LLVM_D_Define_TypeInfoBase(tc->next, this, Type::typeinfoarray);
|
||||
}
|
||||
|
||||
void TypeInfoArrayDeclaration::toDt(dt_t **pdt)
|
||||
{
|
||||
assert(0);
|
||||
}
|
||||
|
||||
/* ========================================================================= */
|
||||
|
||||
void TypeInfoStaticArrayDeclaration::llvmDeclare()
|
||||
{
|
||||
Logger::println("TypeInfoStaticArrayDeclaration::toDt() %s", toChars());
|
||||
Logger::println("TypeInfoStaticArrayDeclaration::llvmDeclare() %s", toChars());
|
||||
LOG_SCOPE;
|
||||
|
||||
// init typeinfo class
|
||||
|
@ -633,7 +608,7 @@ void TypeInfoStaticArrayDeclaration::llvmDeclare()
|
|||
|
||||
void TypeInfoStaticArrayDeclaration::llvmDefine()
|
||||
{
|
||||
Logger::println("TypeInfoStaticArrayDeclaration::toDt() %s", toChars());
|
||||
Logger::println("TypeInfoStaticArrayDeclaration::llvmDefine() %s", toChars());
|
||||
LOG_SCOPE;
|
||||
|
||||
// init typeinfo class
|
||||
|
@ -671,16 +646,11 @@ void TypeInfoStaticArrayDeclaration::llvmDefine()
|
|||
isaGlobalVar(ir.irGlobal->value)->setInitializer(tiInit);
|
||||
}
|
||||
|
||||
void TypeInfoStaticArrayDeclaration::toDt(dt_t **pdt)
|
||||
{
|
||||
assert(0);
|
||||
}
|
||||
|
||||
/* ========================================================================= */
|
||||
|
||||
void TypeInfoAssociativeArrayDeclaration::llvmDeclare()
|
||||
{
|
||||
Logger::println("TypeInfoAssociativeArrayDeclaration::toDt() %s", toChars());
|
||||
Logger::println("TypeInfoAssociativeArrayDeclaration::llvmDeclare() %s", toChars());
|
||||
LOG_SCOPE;
|
||||
|
||||
// init typeinfo class
|
||||
|
@ -693,7 +663,7 @@ void TypeInfoAssociativeArrayDeclaration::llvmDeclare()
|
|||
|
||||
void TypeInfoAssociativeArrayDeclaration::llvmDefine()
|
||||
{
|
||||
Logger::println("TypeInfoAssociativeArrayDeclaration::toDt() %s", toChars());
|
||||
Logger::println("TypeInfoAssociativeArrayDeclaration::llvmDefine() %s", toChars());
|
||||
LOG_SCOPE;
|
||||
|
||||
// init typeinfo class
|
||||
|
@ -730,16 +700,11 @@ void TypeInfoAssociativeArrayDeclaration::llvmDefine()
|
|||
isaGlobalVar(ir.irGlobal->value)->setInitializer(tiInit);
|
||||
}
|
||||
|
||||
void TypeInfoAssociativeArrayDeclaration::toDt(dt_t **pdt)
|
||||
{
|
||||
assert(0);
|
||||
}
|
||||
|
||||
/* ========================================================================= */
|
||||
|
||||
void TypeInfoFunctionDeclaration::llvmDeclare()
|
||||
{
|
||||
Logger::println("TypeInfoFunctionDeclaration::toDt() %s", toChars());
|
||||
Logger::println("TypeInfoFunctionDeclaration::llvmDeclare() %s", toChars());
|
||||
LOG_SCOPE;
|
||||
|
||||
assert(tinfo->ty == Tfunction);
|
||||
|
@ -750,7 +715,7 @@ void TypeInfoFunctionDeclaration::llvmDeclare()
|
|||
|
||||
void TypeInfoFunctionDeclaration::llvmDefine()
|
||||
{
|
||||
Logger::println("TypeInfoFunctionDeclaration::toDt() %s", toChars());
|
||||
Logger::println("TypeInfoFunctionDeclaration::llvmDefine() %s", toChars());
|
||||
LOG_SCOPE;
|
||||
|
||||
assert(tinfo->ty == Tfunction);
|
||||
|
@ -759,16 +724,11 @@ void TypeInfoFunctionDeclaration::llvmDefine()
|
|||
LLVM_D_Define_TypeInfoBase(tc->next, this, Type::typeinfofunction);
|
||||
}
|
||||
|
||||
void TypeInfoFunctionDeclaration::toDt(dt_t **pdt)
|
||||
{
|
||||
assert(0);
|
||||
}
|
||||
|
||||
/* ========================================================================= */
|
||||
|
||||
void TypeInfoDelegateDeclaration::llvmDeclare()
|
||||
{
|
||||
Logger::println("TypeInfoDelegateDeclaration::toDt() %s", toChars());
|
||||
Logger::println("TypeInfoDelegateDeclaration::llvmDeclare() %s", toChars());
|
||||
LOG_SCOPE;
|
||||
|
||||
assert(tinfo->ty == Tdelegate);
|
||||
|
@ -779,7 +739,7 @@ void TypeInfoDelegateDeclaration::llvmDeclare()
|
|||
|
||||
void TypeInfoDelegateDeclaration::llvmDefine()
|
||||
{
|
||||
Logger::println("TypeInfoDelegateDeclaration::toDt() %s", toChars());
|
||||
Logger::println("TypeInfoDelegateDeclaration::llvmDefine() %s", toChars());
|
||||
LOG_SCOPE;
|
||||
|
||||
assert(tinfo->ty == Tdelegate);
|
||||
|
@ -788,11 +748,6 @@ void TypeInfoDelegateDeclaration::llvmDefine()
|
|||
LLVM_D_Define_TypeInfoBase(tc->nextOf()->nextOf(), this, Type::typeinfodelegate);
|
||||
}
|
||||
|
||||
void TypeInfoDelegateDeclaration::toDt(dt_t **pdt)
|
||||
{
|
||||
assert(0);
|
||||
}
|
||||
|
||||
/* ========================================================================= */
|
||||
|
||||
void TypeInfoStructDeclaration::llvmDeclare()
|
||||
|
@ -1007,11 +962,6 @@ void TypeInfoStructDeclaration::llvmDefine()
|
|||
isaGlobalVar(ir.irGlobal->value)->setInitializer(tiInit);
|
||||
}
|
||||
|
||||
void TypeInfoStructDeclaration::toDt(dt_t **pdt)
|
||||
{
|
||||
assert(0);
|
||||
}
|
||||
|
||||
/* ========================================================================= */
|
||||
|
||||
void TypeInfoClassDeclaration::llvmDeclare()
|
||||
|
@ -1063,11 +1013,6 @@ void TypeInfoClassDeclaration::llvmDefine()
|
|||
isaGlobalVar(ir.irGlobal->value)->setInitializer(tiInit);
|
||||
}
|
||||
|
||||
void TypeInfoClassDeclaration::toDt(dt_t **pdt)
|
||||
{
|
||||
assert(0);
|
||||
}
|
||||
|
||||
/* ========================================================================= */
|
||||
|
||||
void TypeInfoInterfaceDeclaration::llvmDeclare()
|
||||
|
@ -1121,11 +1066,6 @@ void TypeInfoInterfaceDeclaration::llvmDefine()
|
|||
isaGlobalVar(ir.irGlobal->value)->setInitializer(tiInit);
|
||||
}
|
||||
|
||||
void TypeInfoInterfaceDeclaration::toDt(dt_t **pdt)
|
||||
{
|
||||
assert(0);
|
||||
}
|
||||
|
||||
/* ========================================================================= */
|
||||
|
||||
void TypeInfoTupleDeclaration::llvmDeclare()
|
||||
|
@ -1208,18 +1148,13 @@ void TypeInfoTupleDeclaration::llvmDefine()
|
|||
isaGlobalVar(ir.irGlobal->value)->setInitializer(tiInit);
|
||||
}
|
||||
|
||||
void TypeInfoTupleDeclaration::toDt(dt_t **pdt)
|
||||
{
|
||||
assert(0);
|
||||
}
|
||||
|
||||
/* ========================================================================= */
|
||||
|
||||
#if DMDV2
|
||||
|
||||
void TypeInfoConstDeclaration::llvmDeclare()
|
||||
{
|
||||
Logger::println("TypeInfoConstDeclaration::toDt() %s", toChars());
|
||||
Logger::println("TypeInfoConstDeclaration::llvmDeclare() %s", toChars());
|
||||
LOG_SCOPE;
|
||||
|
||||
LLVM_D_Declare_TypeInfoBase(this, Type::typeinfoconst);
|
||||
|
@ -1227,7 +1162,7 @@ void TypeInfoConstDeclaration::llvmDeclare()
|
|||
|
||||
void TypeInfoConstDeclaration::llvmDefine()
|
||||
{
|
||||
Logger::println("TypeInfoConstDeclaration::toDt() %s", toChars());
|
||||
Logger::println("TypeInfoConstDeclaration::llvmDefine() %s", toChars());
|
||||
LOG_SCOPE;
|
||||
|
||||
Type *tm = tinfo->mutableOf();
|
||||
|
@ -1236,18 +1171,11 @@ void TypeInfoConstDeclaration::llvmDefine()
|
|||
LLVM_D_Define_TypeInfoBase(tm, this, Type::typeinfoconst);
|
||||
}
|
||||
|
||||
void TypeInfoConstDeclaration::toDt(dt_t **pdt)
|
||||
{
|
||||
assert(0);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
/* ========================================================================= */
|
||||
|
||||
void TypeInfoInvariantDeclaration::llvmDeclare()
|
||||
{
|
||||
Logger::println("TypeInfoInvariantDeclaration::toDt() %s", toChars());
|
||||
Logger::println("TypeInfoInvariantDeclaration::llvmDeclare() %s", toChars());
|
||||
LOG_SCOPE;
|
||||
|
||||
LLVM_D_Declare_TypeInfoBase(this, Type::typeinfoinvariant);
|
||||
|
@ -1255,7 +1183,7 @@ void TypeInfoInvariantDeclaration::llvmDeclare()
|
|||
|
||||
void TypeInfoInvariantDeclaration::llvmDefine()
|
||||
{
|
||||
Logger::println("TypeInfoInvariantDeclaration::toDt() %s", toChars());
|
||||
Logger::println("TypeInfoInvariantDeclaration::llvmDefine() %s", toChars());
|
||||
LOG_SCOPE;
|
||||
|
||||
Type *tm = tinfo->mutableOf();
|
||||
|
@ -1264,9 +1192,4 @@ void TypeInfoInvariantDeclaration::llvmDefine()
|
|||
LLVM_D_Define_TypeInfoBase(tm, this, Type::typeinfoinvariant);
|
||||
}
|
||||
|
||||
void TypeInfoInvariantDeclaration::toDt(dt_t **pdt)
|
||||
{
|
||||
assert(0);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "gen/llvm.h"
|
||||
#include "ir/ir.h"
|
||||
#include "ir/irsymbol.h"
|
||||
#include "ir/irdsymbol.h"
|
||||
#include "ir/irvar.h"
|
||||
|
||||
#include "gen/logger.h"
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef LDC_IR_IRSYMBOL_H
|
||||
#define LDC_IR_IRSYMBOL_H
|
||||
#ifndef LDC_IR_IRDSYMBOL_H
|
||||
#define LDC_IR_IRDSYMBOL_H
|
||||
|
||||
#include <set>
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue