mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-07-22 07:05:22 +02:00
First part of rename to LDC.
This commit is contained in:
16
dmd/attrib.c
16
dmd/attrib.c
@@ -828,7 +828,7 @@ void PragmaDeclaration::semantic(Scope *sc)
|
||||
}
|
||||
#endif
|
||||
|
||||
// LLVMDC
|
||||
// LDC
|
||||
#if IN_LLVM
|
||||
|
||||
// pragma(intrinsic, "string") { funcdecl(s) }
|
||||
@@ -921,8 +921,8 @@ void PragmaDeclaration::semantic(Scope *sc)
|
||||
llvm_internal = LLVMva_arg;
|
||||
}
|
||||
|
||||
// pragma(llvmdc, "string") { templdecl(s) }
|
||||
else if (ident == Id::llvmdc)
|
||||
// pragma(ldc, "string") { templdecl(s) }
|
||||
else if (ident == Id::ldc)
|
||||
{
|
||||
Expression* expr = (Expression *)args->data[0];
|
||||
expr = expr->semantic(sc);
|
||||
@@ -942,7 +942,7 @@ void PragmaDeclaration::semantic(Scope *sc)
|
||||
}
|
||||
}
|
||||
|
||||
#endif // LLVMDC
|
||||
#endif // LDC
|
||||
|
||||
else if (global.params.ignoreUnsupportedPragmas)
|
||||
{
|
||||
@@ -982,14 +982,14 @@ void PragmaDeclaration::semantic(Scope *sc)
|
||||
|
||||
s->semantic(sc);
|
||||
|
||||
// LLVMDC
|
||||
// LDC
|
||||
#if IN_LLVM
|
||||
|
||||
if (llvm_internal)
|
||||
{
|
||||
if (s->llvmInternal)
|
||||
{
|
||||
error("multiple LLVMDC specific pragmas not allowed not affect the same declaration ('%s' at '%s')", s->toChars(), s->loc.toChars());
|
||||
error("multiple LDC specific pragmas not allowed not affect the same declaration ('%s' at '%s')", s->toChars(), s->loc.toChars());
|
||||
fatal();
|
||||
}
|
||||
switch(llvm_internal)
|
||||
@@ -1070,11 +1070,11 @@ void PragmaDeclaration::semantic(Scope *sc)
|
||||
break;
|
||||
|
||||
default:
|
||||
warning("the LLVMDC specific pragma '%s' is not yet implemented, ignoring", ident->toChars());
|
||||
warning("the LDC specific pragma '%s' is not yet implemented, ignoring", ident->toChars());
|
||||
}
|
||||
}
|
||||
|
||||
#endif // LLVMDC
|
||||
#endif // LDC
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -329,7 +329,7 @@ struct TypeInfoDeclaration : VarDeclaration
|
||||
|
||||
virtual TypeInfoDeclaration* isTypeInfoDeclaration() { return this; }
|
||||
|
||||
// LLVMDC
|
||||
// LDC
|
||||
virtual void llvmDeclare();
|
||||
virtual void llvmDefine();
|
||||
};
|
||||
@@ -340,7 +340,7 @@ struct TypeInfoStructDeclaration : TypeInfoDeclaration
|
||||
|
||||
void toDt(dt_t **pdt);
|
||||
|
||||
// LLVMDC
|
||||
// LDC
|
||||
void llvmDeclare();
|
||||
void llvmDefine();
|
||||
};
|
||||
@@ -351,7 +351,7 @@ struct TypeInfoClassDeclaration : TypeInfoDeclaration
|
||||
|
||||
void toDt(dt_t **pdt);
|
||||
|
||||
// LLVMDC
|
||||
// LDC
|
||||
void llvmDeclare();
|
||||
void llvmDefine();
|
||||
};
|
||||
@@ -362,7 +362,7 @@ struct TypeInfoInterfaceDeclaration : TypeInfoDeclaration
|
||||
|
||||
void toDt(dt_t **pdt);
|
||||
|
||||
// LLVMDC
|
||||
// LDC
|
||||
void llvmDeclare();
|
||||
void llvmDefine();
|
||||
};
|
||||
@@ -373,7 +373,7 @@ struct TypeInfoTypedefDeclaration : TypeInfoDeclaration
|
||||
|
||||
void toDt(dt_t **pdt);
|
||||
|
||||
// LLVMDC
|
||||
// LDC
|
||||
void llvmDeclare();
|
||||
void llvmDefine();
|
||||
};
|
||||
@@ -384,7 +384,7 @@ struct TypeInfoPointerDeclaration : TypeInfoDeclaration
|
||||
|
||||
void toDt(dt_t **pdt);
|
||||
|
||||
// LLVMDC
|
||||
// LDC
|
||||
void llvmDeclare();
|
||||
void llvmDefine();
|
||||
};
|
||||
@@ -395,7 +395,7 @@ struct TypeInfoArrayDeclaration : TypeInfoDeclaration
|
||||
|
||||
void toDt(dt_t **pdt);
|
||||
|
||||
// LLVMDC
|
||||
// LDC
|
||||
void llvmDeclare();
|
||||
void llvmDefine();
|
||||
};
|
||||
@@ -406,7 +406,7 @@ struct TypeInfoStaticArrayDeclaration : TypeInfoDeclaration
|
||||
|
||||
void toDt(dt_t **pdt);
|
||||
|
||||
// LLVMDC
|
||||
// LDC
|
||||
void llvmDeclare();
|
||||
void llvmDefine();
|
||||
};
|
||||
@@ -417,7 +417,7 @@ struct TypeInfoAssociativeArrayDeclaration : TypeInfoDeclaration
|
||||
|
||||
void toDt(dt_t **pdt);
|
||||
|
||||
// LLVMDC
|
||||
// LDC
|
||||
void llvmDeclare();
|
||||
void llvmDefine();
|
||||
};
|
||||
@@ -428,7 +428,7 @@ struct TypeInfoEnumDeclaration : TypeInfoDeclaration
|
||||
|
||||
void toDt(dt_t **pdt);
|
||||
|
||||
// LLVMDC
|
||||
// LDC
|
||||
void llvmDeclare();
|
||||
void llvmDefine();
|
||||
};
|
||||
@@ -439,7 +439,7 @@ struct TypeInfoFunctionDeclaration : TypeInfoDeclaration
|
||||
|
||||
void toDt(dt_t **pdt);
|
||||
|
||||
// LLVMDC
|
||||
// LDC
|
||||
void llvmDeclare();
|
||||
void llvmDefine();
|
||||
};
|
||||
@@ -450,7 +450,7 @@ struct TypeInfoDelegateDeclaration : TypeInfoDeclaration
|
||||
|
||||
void toDt(dt_t **pdt);
|
||||
|
||||
// LLVMDC
|
||||
// LDC
|
||||
void llvmDeclare();
|
||||
void llvmDefine();
|
||||
};
|
||||
@@ -461,7 +461,7 @@ struct TypeInfoTupleDeclaration : TypeInfoDeclaration
|
||||
|
||||
void toDt(dt_t **pdt);
|
||||
|
||||
// LLVMDC
|
||||
// LDC
|
||||
void llvmDeclare();
|
||||
void llvmDefine();
|
||||
};
|
||||
@@ -473,7 +473,7 @@ struct TypeInfoConstDeclaration : TypeInfoDeclaration
|
||||
|
||||
void toDt(dt_t **pdt);
|
||||
|
||||
// LLVMDC
|
||||
// LDC
|
||||
void llvmDeclare();
|
||||
void llvmDefine();
|
||||
};
|
||||
@@ -484,7 +484,7 @@ struct TypeInfoInvariantDeclaration : TypeInfoDeclaration
|
||||
|
||||
void toDt(dt_t **pdt);
|
||||
|
||||
// LLVMDC
|
||||
// LDC
|
||||
void llvmDeclare();
|
||||
void llvmDefine();
|
||||
};
|
||||
@@ -624,7 +624,7 @@ struct FuncDeclaration : Declaration
|
||||
const char *kind();
|
||||
void toDocBuffer(OutBuffer *buf);
|
||||
|
||||
// LLVMDC: give argument types to runtime functions
|
||||
// LDC: give argument types to runtime functions
|
||||
static FuncDeclaration *genCfunc(Arguments *args, Type *treturn, char *name);
|
||||
static FuncDeclaration *genCfunc(Arguments *args, Type *treturn, Identifier *id);
|
||||
|
||||
@@ -635,7 +635,7 @@ struct FuncDeclaration : Declaration
|
||||
|
||||
FuncDeclaration *isFuncDeclaration() { return this; }
|
||||
|
||||
// llvmdc stuff
|
||||
// LDC stuff
|
||||
|
||||
// vars declared in this function that nested funcs reference
|
||||
// is this is not empty, nestedFrameRef is set and these VarDecls
|
||||
|
||||
4
dmd/id.c
4
dmd/id.c
@@ -176,7 +176,7 @@ Identifier *Id::vastart;
|
||||
Identifier *Id::vacopy;
|
||||
Identifier *Id::vaend;
|
||||
Identifier *Id::vaarg;
|
||||
Identifier *Id::llvmdc;
|
||||
Identifier *Id::ldc;
|
||||
Identifier *Id::tohash;
|
||||
Identifier *Id::tostring;
|
||||
Identifier *Id::main;
|
||||
@@ -358,7 +358,7 @@ void Id::initialize()
|
||||
vacopy = Lexer::idPool("va_copy");
|
||||
vaend = Lexer::idPool("va_end");
|
||||
vaarg = Lexer::idPool("va_arg");
|
||||
llvmdc = Lexer::idPool("llvmdc");
|
||||
ldc = Lexer::idPool("ldc");
|
||||
tohash = Lexer::idPool("toHash");
|
||||
tostring = Lexer::idPool("toString");
|
||||
main = Lexer::idPool("main");
|
||||
|
||||
2
dmd/id.h
2
dmd/id.h
@@ -178,7 +178,7 @@ struct Id
|
||||
static Identifier *vacopy;
|
||||
static Identifier *vaend;
|
||||
static Identifier *vaarg;
|
||||
static Identifier *llvmdc;
|
||||
static Identifier *ldc;
|
||||
static Identifier *tohash;
|
||||
static Identifier *tostring;
|
||||
static Identifier *main;
|
||||
|
||||
@@ -213,7 +213,7 @@ Msgtable msgtable[] =
|
||||
{ "lib" },
|
||||
{ "msg" },
|
||||
|
||||
// LLVMDC pragma's
|
||||
// LDC pragma's
|
||||
{ "intrinsic" },
|
||||
{ "va_intrinsic" },
|
||||
{ "no_typeinfo" },
|
||||
@@ -223,7 +223,7 @@ Msgtable msgtable[] =
|
||||
{ "vacopy", "va_copy" },
|
||||
{ "vaend", "va_end" },
|
||||
{ "vaarg", "va_arg" },
|
||||
{ "llvmdc" },
|
||||
{ "ldc" },
|
||||
|
||||
// For special functions
|
||||
{ "tohash", "toHash" },
|
||||
|
||||
18
dmd/mars.c
18
dmd/mars.c
@@ -51,7 +51,7 @@ Global::Global()
|
||||
doc_ext = "html";
|
||||
ddoc_ext = "ddoc";
|
||||
|
||||
// LLVMDC
|
||||
// LDC
|
||||
obj_ext = "bc";
|
||||
ll_ext = "ll";
|
||||
bc_ext = "bc";
|
||||
@@ -66,7 +66,7 @@ Global::Global()
|
||||
copyright = "Copyright (c) 1999-2008 by Digital Mars and Tomas Lindquist Olsen";
|
||||
written = "written by Walter Bright and Tomas Lindquist Olsen";
|
||||
version = "v1.035";
|
||||
llvmdc_version = "0.1";
|
||||
ldc_version = "0.1";
|
||||
global.structalign = 8;
|
||||
|
||||
memset(¶ms, 0, sizeof(Param));
|
||||
@@ -154,12 +154,12 @@ extern void backend_term();
|
||||
void usage()
|
||||
{
|
||||
printf("LLVM D Compiler %s (based on DMD %s and LLVM 2.4svn)\n%s\n%s\n",
|
||||
global.llvmdc_version, global.version, global.copyright, global.written);
|
||||
global.ldc_version, global.version, global.copyright, global.written);
|
||||
printf("\
|
||||
D Language Documentation: http://www.digitalmars.com/d/1.0/index.html\n\
|
||||
LLVMDC Homepage: http://www.dsource.org/projects/llvmdc\n\
|
||||
LDC Homepage: http://www.dsource.org/projects/llvmdc\n\
|
||||
Usage:\n\
|
||||
llvmdc files.d ... { -switch }\n\
|
||||
ldc files.d ... { -switch }\n\
|
||||
\n\
|
||||
files.d D source files\n%s\
|
||||
-of<filename> name output file to <filename>\n\
|
||||
@@ -321,7 +321,7 @@ int main(int argc, char *argv[])
|
||||
// Predefine version identifiers
|
||||
#if IN_LLVM
|
||||
VersionCondition::addPredefinedGlobalIdent("LLVM");
|
||||
VersionCondition::addPredefinedGlobalIdent("LLVMDC");
|
||||
VersionCondition::addPredefinedGlobalIdent("LDC");
|
||||
#endif
|
||||
|
||||
// setup default target os to be build os
|
||||
@@ -343,9 +343,9 @@ int main(int argc, char *argv[])
|
||||
VersionCondition::addPredefinedGlobalIdent("all");
|
||||
|
||||
#if _WIN32
|
||||
inifile(global.params.argv0, "llvmdc.ini");
|
||||
inifile(global.params.argv0, "ldc.ini");
|
||||
#elif POSIX
|
||||
inifile(global.params.argv0, "llvmdc.conf");
|
||||
inifile(global.params.argv0, "ldc.conf");
|
||||
#else
|
||||
#error
|
||||
#endif
|
||||
@@ -716,7 +716,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
char *arg;
|
||||
arg = (char *)mem.malloc(64);
|
||||
strcpy(arg, "-lllvmdc-runtime");
|
||||
strcpy(arg, "-lldc-runtime");
|
||||
global.params.linkswitches->push(arg);
|
||||
arg = (char *)mem.malloc(64);
|
||||
strcpy(arg, "-ltango-cc-tango");
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
struct Array;
|
||||
|
||||
// LLVMDC
|
||||
// LDC
|
||||
enum ARCH
|
||||
{
|
||||
ARCHinvalid,
|
||||
@@ -139,7 +139,7 @@ struct Param
|
||||
char *resfile;
|
||||
char *exefile;
|
||||
|
||||
// LLVMDC stuff
|
||||
// LDC stuff
|
||||
char *llvmArch;
|
||||
char forceBE;
|
||||
char *tt_arch;
|
||||
@@ -170,7 +170,7 @@ struct Global
|
||||
Array *filePath; // Array of char*'s which form the file import lookup path
|
||||
int structalign;
|
||||
char *version;
|
||||
char *llvmdc_version;
|
||||
char *ldc_version;
|
||||
|
||||
Param params;
|
||||
unsigned errors; // number of errors reported so far
|
||||
|
||||
14
dmd/mtype.h
14
dmd/mtype.h
@@ -98,7 +98,7 @@ enum TY
|
||||
Ttuple,
|
||||
Tslice,
|
||||
|
||||
// LLVMDC
|
||||
// LDC
|
||||
Topaque,
|
||||
|
||||
TMAX
|
||||
@@ -177,7 +177,7 @@ struct Type : Object
|
||||
static ClassDeclaration *typeinfodelegate;
|
||||
static ClassDeclaration *typeinfotypelist;
|
||||
|
||||
// LLVMDC, for runtime function signatures that contain
|
||||
// LDC, for runtime function signatures that contain
|
||||
// AAs or arrays of unknown type
|
||||
static Type* topaque;
|
||||
|
||||
@@ -260,7 +260,7 @@ struct Type : Object
|
||||
// For eliminating dynamic_cast
|
||||
virtual TypeBasic *isTypeBasic();
|
||||
|
||||
// llvmdc
|
||||
// LDC
|
||||
IrType ir;
|
||||
};
|
||||
|
||||
@@ -389,7 +389,7 @@ struct TypePointer : Type
|
||||
void toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod);
|
||||
MATCH implicitConvTo(Type *to);
|
||||
int isscalar();
|
||||
// LLVMDC: pointers are unsigned
|
||||
// LDC: pointers are unsigned
|
||||
int isunsigned() { return TRUE; };
|
||||
Expression *defaultInit(Loc loc);
|
||||
int isZeroInit();
|
||||
@@ -441,7 +441,7 @@ struct TypeFunction : Type
|
||||
|
||||
unsigned totym();
|
||||
|
||||
// LLVMDC
|
||||
// LDC
|
||||
bool retInPtr;
|
||||
bool usesThis;
|
||||
bool usesNest;
|
||||
@@ -674,7 +674,7 @@ struct TypeSlice : Type
|
||||
void toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod);
|
||||
};
|
||||
|
||||
//LLVMDC
|
||||
//LDC
|
||||
struct TypeOpaque : Type
|
||||
{
|
||||
TypeOpaque() : Type(Topaque, NULL) {}
|
||||
@@ -704,7 +704,7 @@ struct Argument : Object
|
||||
static size_t dim(Arguments *arguments);
|
||||
static Argument *getNth(Arguments *arguments, size_t nth, size_t *pn = NULL);
|
||||
|
||||
// LLVMDC
|
||||
// LDC
|
||||
unsigned llvmAttrs;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user