diff --git a/.hgignore b/.hgignore index e81a5a1c24..19a92247fa 100644 --- a/.hgignore +++ b/.hgignore @@ -11,12 +11,12 @@ obj/* tango import Makefile -bin/llvmdc +bin/ldc idgen idgen.make impcnvgen impcnvgen.make -llvmdc.make +ldc.make dmd/impcnvtab.c tests/runminitest tests/findregressions diff --git a/demos/qd.d b/demos/qd.d index 4a743a024d..54bc58a1cd 100644 --- a/demos/qd.d +++ b/demos/qd.d @@ -291,7 +291,7 @@ void line(T...)(int x0, int y0, int x1, int y1, T p) { } } -import llvmdc.intrinsics; +import ldc.intrinsics; alias llvm_sqrt_f32 sqrt; alias llvm_sqrt_f64 sqrt; version(X86) diff --git a/demos/readme.txt b/demos/readme.txt index c980640a92..6718884697 100644 --- a/demos/readme.txt +++ b/demos/readme.txt @@ -1 +1 @@ -use rebuild with -dc=llvmdc-posix to build the demos +use rebuild with -dc=ldc-posix to build the demos diff --git a/dmd/attrib.c b/dmd/attrib.c index 859395a72e..d440a7f420 100644 --- a/dmd/attrib.c +++ b/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 } } diff --git a/dmd/declaration.h b/dmd/declaration.h index 4a728b961e..2702889468 100644 --- a/dmd/declaration.h +++ b/dmd/declaration.h @@ -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 diff --git a/dmd/id.c b/dmd/id.c index 25ec3e34df..c7fe695062 100644 --- a/dmd/id.c +++ b/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"); diff --git a/dmd/id.h b/dmd/id.h index f485e41751..f8a918ddde 100644 --- a/dmd/id.h +++ b/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; diff --git a/dmd/idgen.c b/dmd/idgen.c index 2febe4525c..661cc68186 100644 --- a/dmd/idgen.c +++ b/dmd/idgen.c @@ -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" }, diff --git a/dmd/mars.c b/dmd/mars.c index 6218d1de95..e9e980064b 100644 --- a/dmd/mars.c +++ b/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 name output file to \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"); diff --git a/dmd/mars.h b/dmd/mars.h index d7c3481eed..c4e0d0dec9 100644 --- a/dmd/mars.h +++ b/dmd/mars.h @@ -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 diff --git a/dmd/mtype.h b/dmd/mtype.h index 51eae45a37..fbb798de80 100644 --- a/dmd/mtype.h +++ b/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; }; diff --git a/gen/enums.h b/gen/enums.h index 9a52d799b3..444ea59726 100644 --- a/gen/enums.h +++ b/gen/enums.h @@ -9,5 +9,5 @@ enum LLVMva_copy, LLVMva_end, LLVMva_arg, - LLVMllvmdc + LLVMldc }; diff --git a/gen/linker.cpp b/gen/linker.cpp index 5176080a74..08c3d97519 100644 --- a/gen/linker.cpp +++ b/gen/linker.cpp @@ -21,7 +21,7 @@ void linkModules(llvm::Module* dst, const Module_vector& MV) if (MV.empty()) return; - llvm::Linker linker("llvmdc", dst); + llvm::Linker linker("ldc", dst); std::string err; for (Module_vector::const_iterator i=MV.begin(); i!=MV.end(); ++i) diff --git a/gen/optimizer.cpp b/gen/optimizer.cpp index 134c79eee8..246e195c1a 100644 --- a/gen/optimizer.cpp +++ b/gen/optimizer.cpp @@ -10,7 +10,7 @@ using namespace llvm; // this function runs some or all of the std-compile-opts passes depending on the // optimization level given. -void llvmdc_optimize_module(Module* m, char lvl, bool doinline) +void ldc_optimize_module(Module* m, char lvl, bool doinline) { if (!doinline && lvl < 0) return; diff --git a/gen/runtime.cpp b/gen/runtime.cpp index ab05a8c452..fb69a4b216 100644 --- a/gen/runtime.cpp +++ b/gen/runtime.cpp @@ -153,7 +153,7 @@ static const LLType* rt_dg2() static void LLVM_D_BuildRuntimeModule() { - M = new llvm::Module("llvmdc internal runtime"); + M = new llvm::Module("ldc internal runtime"); const LLType* voidTy = LLType::VoidTy; const LLType* boolTy = LLType::Int1Ty; diff --git a/gen/todebug.cpp b/gen/todebug.cpp index d6781f5826..6881d01032 100644 --- a/gen/todebug.cpp +++ b/gen/todebug.cpp @@ -140,7 +140,7 @@ static LLGlobalVariable* dwarfCompileUnit(Module* m) if (srcpath.empty()) srcpath = llvm::sys::Path::GetCurrentDirectory().toString(); vals[4] = DtoConstStringPtr(srcpath.c_str(), "llvm.metadata"); - vals[5] = DtoConstStringPtr("LLVMDC (http://www.dsource.org/projects/llvmdc)", "llvm.metadata"); + vals[5] = DtoConstStringPtr("LDC (http://www.dsource.org/projects/llvmdc)", "llvm.metadata"); LLGlobalVariable* gv = emitDwarfGlobal(getDwarfCompileUnitType(), vals, "llvm.dbg.compile_unit"); m->ir.irModule->dwarfCompileUnit = gv; diff --git a/gen/toobj.cpp b/gen/toobj.cpp index a9c40382a4..585f030f12 100644 --- a/gen/toobj.cpp +++ b/gen/toobj.cpp @@ -49,7 +49,7 @@ ////////////////////////////////////////////////////////////////////////////////////////// // in gen/optimize.cpp -void llvmdc_optimize_module(llvm::Module* m, char lvl, bool doinline); +void ldc_optimize_module(llvm::Module* m, char lvl, bool doinline); ////////////////////////////////////////////////////////////////////////////////////////// @@ -152,7 +152,7 @@ void Module::genobjfile(int multiobj) } // run optimizer - llvmdc_optimize_module(ir.module, global.params.optimizeLevel, global.params.llvmInline); + ldc_optimize_module(ir.module, global.params.optimizeLevel, global.params.llvmInline); // verify the llvm if (!global.params.novalidate && (global.params.optimizeLevel >= 0 || global.params.llvmInline)) { diff --git a/gen/typinf.cpp b/gen/typinf.cpp index c2cb8b5a41..6c5fcd9f7c 100644 --- a/gen/typinf.cpp +++ b/gen/typinf.cpp @@ -8,7 +8,7 @@ // in artistic.txt, or the GNU General Public License in gnu.txt. // See the included readme.txt for details. -// Modifications for LLVMDC: +// Modifications for LDC: // Copyright (c) 2007 by Tomas Lindquist Olsen // tomas at famolsen dk @@ -234,7 +234,7 @@ int TypeDArray::builtinTypeInfo() Expression *createTypeInfoArray(Scope *sc, Expression *exps[], int dim) { - assert(0); // done elsewhere in llvmdc + assert(0); // done elsewhere in LDC return NULL; } diff --git a/llvmdc-tango b/llvmdc-tango index 54241e5ae8..afa58c53e9 100644 --- a/llvmdc-tango +++ b/llvmdc-tango @@ -1,14 +1,14 @@ ignore=object -compiler=llvmdc -inifile=llvmdc.conf +compiler=ldc +inifile=ldc.conf exeext= objext=bc version=LLVM -version=LLVMDC +version=LDC noversion=DigitalMars noversion=GNU testversion=linux @@ -37,7 +37,7 @@ testversion=PIC [compile] -cmd=llvmdc -c $i +cmd=ldc -c $i flag=$i incdir=-I$i @@ -48,7 +48,7 @@ version=-version=$i [link] oneatatime=yes -cmd=llvmdc $i -of$o +cmd=ldc $i -of$o libdir=-L-L=$i lib=-L-l=$i diff --git a/lphobos/build.sh b/lphobos/build.sh index 57276a25f3..6eca5a0578 100755 --- a/lphobos/build.sh +++ b/lphobos/build.sh @@ -5,100 +5,100 @@ mkdir -p obj rm -f obj/*.bc rm -f ../lib/*.bc -LLVMDCFLAGS_ASM="-c -oq -release" -LLVMDCFLAGS="$LLVMDCFLAGS_ASM -noasm" +LDCFLAGS_ASM="-c -oq -release" +LDCFLAGS="$LDCFLAGS_ASM -noasm" echo "compiling contract runtime" -llvmdc internal/contract.d -c -of../lib/llvmdcore.bc || exit 1 #-noruntime || exit 1 +ldc internal/contract.d -c -of../lib/ldcore.bc || exit 1 #-noruntime || exit 1 echo "compiling common runtime" -./llvmdc-build internal/arrays.d \ +./ldc-build internal/arrays.d \ internal/mem.d \ internal/critical.d \ internal/dmain2.d \ internal/inv.d \ - $LLVMDCFLAGS_ASM || exit 1 + $LDCFLAGS_ASM || exit 1 mv *.bc obj -llvm-link -f -o=../lib/llvmdcore.bc obj/internal.*.bc ../lib/llvmdcore.bc +llvm-link -f -o=../lib/ldcore.bc obj/internal.*.bc ../lib/ldcore.bc echo "compiling typeinfo 1" -./llvmdc-build typeinfos1.d $LLVMDCFLAGS || exit 1 +./ldc-build typeinfos1.d $LDCFLAGS || exit 1 mv *.bc obj -llvm-link -f -o=../lib/llvmdcore.bc `ls obj/typeinfo1.*.bc` ../lib/llvmdcore.bc || exit 1 +llvm-link -f -o=../lib/ldcore.bc `ls obj/typeinfo1.*.bc` ../lib/ldcore.bc || exit 1 echo "compiling typeinfo 2" -./llvmdc-build typeinfos2.d $LLVMDCFLAGS || exit 1 +./ldc-build typeinfos2.d $LDCFLAGS || exit 1 mv *.bc obj -llvm-link -f -o=../lib/llvmdcore.bc `ls obj/typeinfo2.*.bc` ../lib/llvmdcore.bc || exit 1 +llvm-link -f -o=../lib/ldcore.bc `ls obj/typeinfo2.*.bc` ../lib/ldcore.bc || exit 1 echo "compiling exceptions" -./llvmdc-build internal/eh.d $LLVMDCFLAGS -debug || exit 1 +./ldc-build internal/eh.d $LDCFLAGS -debug || exit 1 mv *.bc obj -llvm-link -f -o=../lib/llvmdcore.bc obj/*eh.bc ../lib/llvmdcore.bc || exit 1 +llvm-link -f -o=../lib/ldcore.bc obj/*eh.bc ../lib/ldcore.bc || exit 1 echo "compiling object/interface casting runtime support" -llvmdc internal/cast.d $LLVMDCFLAGS || exit 1 +ldc internal/cast.d $LDCFLAGS || exit 1 mv *.bc obj -llvm-link -f -o=../lib/llvmdcore.bc obj/cast.bc ../lib/llvmdcore.bc || exit 1 +llvm-link -f -o=../lib/ldcore.bc obj/cast.bc ../lib/ldcore.bc || exit 1 echo "compiling string foreach/switch runtime support" -llvmdc internal/aApply.d $LLVMDCFLAGS || exit 1 -llvmdc internal/aApplyR.d $LLVMDCFLAGS || exit 1 -llvmdc internal/switch.d $LLVMDCFLAGS || exit 1 +ldc internal/aApply.d $LDCFLAGS || exit 1 +ldc internal/aApplyR.d $LDCFLAGS || exit 1 +ldc internal/switch.d $LDCFLAGS || exit 1 mv *.bc obj -llvm-link -f -o=../lib/llvmdcore.bc obj/aApply.bc obj/aApplyR.bc obj/switch.bc ../lib/llvmdcore.bc || exit 1 +llvm-link -f -o=../lib/ldcore.bc obj/aApply.bc obj/aApplyR.bc obj/switch.bc ../lib/ldcore.bc || exit 1 echo "compiling array runtime support" -llvmdc internal/qsort2.d internal/adi.d internal/aaA.d $LLVMDCFLAGS || exit 1 +ldc internal/qsort2.d internal/adi.d internal/aaA.d $LDCFLAGS || exit 1 mv *.bc obj -llvm-link -f -o=../lib/llvmdcore.bc obj/qsort2.bc obj/adi.bc obj/aaA.bc ../lib/llvmdcore.bc || exit 1 +llvm-link -f -o=../lib/ldcore.bc obj/qsort2.bc obj/adi.bc obj/aaA.bc ../lib/ldcore.bc || exit 1 echo "compiling object implementation" -llvmdc internal/objectimpl.d $LLVMDCFLAGS || exit 1 +ldc internal/objectimpl.d $LDCFLAGS || exit 1 mv object.bc objectimpl.bc mv *.bc obj -llvm-link -f -o=../lib/llvmdcore.bc obj/objectimpl.bc ../lib/llvmdcore.bc || exit 1 +llvm-link -f -o=../lib/ldcore.bc obj/objectimpl.bc ../lib/ldcore.bc || exit 1 echo "compiling crc32" -llvmdc crc32.d $LLVMDCFLAGS || exit 1 +ldc crc32.d $LDCFLAGS || exit 1 mv *.bc obj -llvm-link -f -o=../lib/llvmdcore.bc ../lib/llvmdcore.bc obj/crc32.bc || exit 1 +llvm-link -f -o=../lib/ldcore.bc ../lib/ldcore.bc obj/crc32.bc || exit 1 echo "compiling llvm runtime support" -# ./llvmdc-build llvmsupport.d $LLVMDCFLAGS || exit 1 -llvmdc llvmsupport.d -oq -c || exit 1 +# ./ldc-build llvmsupport.d $LDCFLAGS || exit 1 +ldc llvmsupport.d -oq -c || exit 1 mv *.bc obj -llvm-link -f -o=../lib/llvmdcore.bc `ls obj/llvm*.bc` ../lib/llvmdcore.bc || exit 1 +llvm-link -f -o=../lib/ldcore.bc `ls obj/llvm*.bc` ../lib/ldcore.bc || exit 1 echo "compiling garbage collector" cd gc -llvmdc $(ls *.d |grep -v win32) $LLVMDCFLAGS_ASM -I.. ||exit 1 -# llvmdc gclinux.d $LLVMDCFLAGS -I.. || exit 1 -# llvmdc gcx.d $LLVMDCFLAGS -I.. || exit 1 -# llvmdc gcbits.d $LLVMDCFLAGS -I.. || exit 1 -# llvmdc gc.d -oq -c -I.. || exit 1 +ldc $(ls *.d |grep -v win32) $LDCFLAGS_ASM -I.. ||exit 1 +# ldc gclinux.d $LDCFLAGS -I.. || exit 1 +# ldc gcx.d $LDCFLAGS -I.. || exit 1 +# ldc gcbits.d $LDCFLAGS -I.. || exit 1 +# ldc gc.d -oq -c -I.. || exit 1 mv std.gc.bc std_gc.bc mv *.bc ../obj # mv -v obj/*.bc ../obj cd .. -llvm-link -f -o=../lib/llvmdcore.bc obj/gclinux.bc obj/gcx.bc obj/gcbits.bc obj/std_gc.bc ../lib/llvmdcore.bc || exit 1 +llvm-link -f -o=../lib/ldcore.bc obj/gclinux.bc obj/gcx.bc obj/gcbits.bc obj/std_gc.bc ../lib/ldcore.bc || exit 1 echo "compiling phobos" -./llvmdc-build phobos.d $LLVMDCFLAGS || exit 1 +./ldc-build phobos.d $LDCFLAGS || exit 1 mv *.bc obj echo "linking phobos" -# llvm-link -f -o=../lib/llvmdcore.bc `ls obj/std.*.bc` ../lib/llvmdcore.bc || exit 1 +# llvm-link -f -o=../lib/ldcore.bc `ls obj/std.*.bc` ../lib/ldcore.bc || exit 1 for i in $(ls obj/std.*.bc); do echo $i - llvm-link -f -o=../lib/llvmdcore.bc ../lib/llvmdcore.bc $i || exit 1 + llvm-link -f -o=../lib/ldcore.bc ../lib/ldcore.bc $i || exit 1 done echo "Compiling auxiliary" -./llvmdc-build etc/c/zlib.d $LLVMDCFLAGS || exit 1 +./ldc-build etc/c/zlib.d $LDCFLAGS || exit 1 mv *.bc obj -llvm-link -f -o=../lib/llvmdcore.bc `ls obj/etc.*.bc` ../lib/llvmdcore.bc || exit 1 +llvm-link -f -o=../lib/ldcore.bc `ls obj/etc.*.bc` ../lib/ldcore.bc || exit 1 echo "optimizing" -opt -stats -p -f -std-compile-opts -o=../lib/llvmdcore.bc ../lib/llvmdcore.bc || exit 1 +opt -stats -p -f -std-compile-opts -o=../lib/ldcore.bc ../lib/ldcore.bc || exit 1 echo "SUCCESS" diff --git a/lphobos/llvmdc-build b/lphobos/llvmdc-build index 8f2c150997..cce9ecddf7 100755 --- a/lphobos/llvmdc-build +++ b/lphobos/llvmdc-build @@ -1,9 +1,9 @@ #!/bin/sh export PATH=$PATH:/opt/llvm/bin export FILE=$1; shift -export LLVMDC_PATH=~/llvmdc -PARAM=$(for p_file in $($LLVMDC_PATH/bin/llvmdc $FILE -I~/llvmdc/lphobos -c -v -of/dev/null |grep import \ +export LDC_PATH=~/ldc +PARAM=$(for p_file in $($LDC_PATH/bin/ldc $FILE -I~/ldc/lphobos -c -v -of/dev/null |grep import \ |sed -e "s/import *//" -e "s/\t.*//" \ |sed -e "s/\./\//g" -e "s/$/\.d/"); do if [ -f $p_file ]; then echo $p_file; fi; done) -echo llvmdc $FILE $@ $PARAM -$LLVMDC_PATH/bin/llvmdc $FILE $@ $PARAM +echo ldc $FILE $@ $PARAM +$LDC_PATH/bin/ldc $FILE $@ $PARAM diff --git a/premake.lua b/premake.lua index 45122a1523..2662b587a0 100644 --- a/premake.lua +++ b/premake.lua @@ -1,4 +1,4 @@ -project.name = llvmdc +project.name = ldc -- options @@ -44,10 +44,10 @@ package.buildoptions = { "-x c++" } package.postbuildcommands = { "./impcnvgen", "mv -f impcnvtab.c dmd" } package.defines = { "DMDV1="..DMDV1 } --- llvmdc +-- ldc package = newpackage() package.bindir = "bin" -package.name = "llvmdc" +package.name = "ldc" package.kind = "exe" package.language = "c++" package.files = { matchfiles("dmd/*.c"), matchfiles("gen/*.cpp"), matchfiles("ir/*.cpp") } diff --git a/readme.txt b/readme.txt index b677256924..6cd0298dee 100644 --- a/readme.txt +++ b/readme.txt @@ -1,8 +1,8 @@ -LLVM D Compiler (LLVMDC) +LLVM D Compiler (LDC) This compiler is based on the Digital Mars D (DMD) compiler frontend, and the LLVM compiler toolkit. See LICENSE for licensing information. -For more information, including build instructions, visit the LLVMDC website: +For more information, including build instructions, visit the LDC website: http://www.dsource.org/projects/llvmdc diff --git a/runtime/README b/runtime/README index 9ba3d46e96..1eb10d2d65 100644 --- a/runtime/README +++ b/runtime/README @@ -1,4 +1,4 @@ -1) Do a checkout of tango trunk in the llvmdc root dir (along dmd, gen, runtime etc). +1) Do a checkout of tango trunk in the ldc root dir (along dmd, gen, runtime etc). * svn co http://svn.dsource.org/projects/tango/trunk ../tango diff --git a/runtime/build-sharedlibs.sh b/runtime/build-sharedlibs.sh index e1ee426c0e..298b5b64c5 100755 --- a/runtime/build-sharedlibs.sh +++ b/runtime/build-sharedlibs.sh @@ -3,21 +3,21 @@ # I'm no good bash scripter ... # copy imports -mkdir -p ../tango/llvmdc -cp internal/llvmdc/bitmanip.d ../tango/llvmdc/bitmanip.di -cp internal/llvmdc/vararg.d ../tango/llvmdc/vararg.di -cp import/llvmdc/* ../tango/llvmdc +mkdir -p ../tango/ldc +cp internal/ldc/bitmanip.d ../tango/ldc/bitmanip.di +cp internal/ldc/vararg.d ../tango/ldc/vararg.di +cp import/ldc/* ../tango/ldc # make the runtime cp -R lib ../tango cd ../tango/lib -make -f llvmdc-posix.mak clean -make -f llvmdc-posix.mak sharedlib +make -f ldc-posix.mak clean +make -f ldc-posix.mak sharedlib cd ../.. # install the runtime -rm -f lib/libllvmdc-runtime-shared.so -cp runtime/internal/libllvmdc-runtime-shared.so lib +rm -f lib/libldc-runtime-shared.so +cp runtime/internal/libldc-runtime-shared.so lib rm -f lib/libtango-gc-basic-shared.so cp tango/lib/gc/basic/libtango-gc-basic-shared.so lib rm -f lib/libtango-cc-tango-shared.so diff --git a/runtime/build.sh b/runtime/build.sh index 25ec41d23f..88505bd067 100755 --- a/runtime/build.sh +++ b/runtime/build.sh @@ -3,21 +3,21 @@ # I'm no good bash scripter ... # copy imports -mkdir -p ../tango/llvmdc -cp internal/llvmdc/bitmanip.d ../tango/llvmdc/bitmanip.di -cp internal/llvmdc/vararg.d ../tango/llvmdc/vararg.di -cp import/llvmdc/* ../tango/llvmdc +mkdir -p ../tango/ldc +cp internal/ldc/bitmanip.d ../tango/ldc/bitmanip.di +cp internal/ldc/vararg.d ../tango/ldc/vararg.di +cp import/ldc/* ../tango/ldc # make the runtime cp -R lib ../tango cd ../tango/lib -make -f llvmdc-posix.mak clean -make -f llvmdc-posix.mak lib +make -f ldc-posix.mak clean +make -f ldc-posix.mak lib cd ../.. # install the runtime -rm -f lib/libllvmdc-runtime*.a -cp runtime/internal/libllvmdc-runtime*.a lib +rm -f lib/libldc-runtime*.a +cp runtime/internal/libldc-runtime*.a lib rm -f lib/libtango-gc-basic*.a cp tango/lib/gc/basic/libtango-gc-basic*.a lib rm -f lib/libtango-cc-tango*.a diff --git a/runtime/import/llvmdc/cstdarg.di b/runtime/import/llvmdc/cstdarg.di index 54e7ab023f..4c980416a7 100644 --- a/runtime/import/llvmdc/cstdarg.di +++ b/runtime/import/llvmdc/cstdarg.di @@ -2,16 +2,16 @@ * vararg support for extern(C) functions */ -module llvmdc.cstdarg; +module ldc.cstdarg; // Check for the right compiler -version(LLVMDC) +version(LDC) { // OK } else { - static assert(false, "This module is only valid for LLVMDC"); + static assert(false, "This module is only valid for LDC"); } alias void* va_list; diff --git a/runtime/import/llvmdc/intrinsics.di b/runtime/import/llvmdc/intrinsics.di index c1d6bdb9a3..1414cb2fc8 100644 --- a/runtime/import/llvmdc/intrinsics.di +++ b/runtime/import/llvmdc/intrinsics.di @@ -7,16 +7,16 @@ * */ -module llvmdc.intrinsics; +module ldc.intrinsics; // Check for the right compiler -version(LLVMDC) +version(LDC) { // OK } else { - static assert(false, "This module is only valid for LLVMDC"); + static assert(false, "This module is only valid for LDC"); } // diff --git a/runtime/internal/arrayInit.d b/runtime/internal/arrayInit.d index 0aeb13f02c..5485699c4e 100644 --- a/runtime/internal/arrayInit.d +++ b/runtime/internal/arrayInit.d @@ -1,4 +1,4 @@ -private import llvmdc.intrinsics; +private import ldc.intrinsics; extern(C): diff --git a/runtime/internal/eh.d b/runtime/internal/eh.d index cb12360c58..83dc580e2f 100644 --- a/runtime/internal/eh.d +++ b/runtime/internal/eh.d @@ -5,7 +5,7 @@ module eh; import util.console; -import llvmdc.cstdarg; +import ldc.cstdarg; // debug = EH_personality; diff --git a/runtime/internal/lifetime.d b/runtime/internal/lifetime.d index bfeae26c6c..b0f15e92cd 100644 --- a/runtime/internal/lifetime.d +++ b/runtime/internal/lifetime.d @@ -127,7 +127,7 @@ extern (C) Object _d_newclass(ClassInfo ci) } // initialize it - // llvmdc does this inline + // ldc does this inline //(cast(byte*) p)[0 .. ci.init.length] = ci.init[]; debug(PRINTF) printf("initialization done\n"); diff --git a/runtime/internal/llvmdc.mak b/runtime/internal/llvmdc.mak index 2ffe7d901c..ec70f92b27 100644 --- a/runtime/internal/llvmdc.mak +++ b/runtime/internal/llvmdc.mak @@ -1,4 +1,4 @@ -# Makefile to build the LLVMDC compiler runtime D library for Linux +# Makefile to build the LDC compiler runtime D library for Linux # Designed to work with GNU make # Targets: # make @@ -10,11 +10,11 @@ # make clean # Delete unneeded files created by build process -LIB_TARGET_FULL=libllvmdc-runtime.a -LIB_TARGET_BC_ONLY=libllvmdc-runtime-bc-only.a -LIB_TARGET_C_ONLY=libllvmdc-runtime-c-only.a -LIB_TARGET_SHARED=libllvmdc-runtime-shared.so -LIB_MASK=libllvmdc-runtime*.* +LIB_TARGET_FULL=libldc-runtime.a +LIB_TARGET_BC_ONLY=libldc-runtime-bc-only.a +LIB_TARGET_C_ONLY=libldc-runtime-c-only.a +LIB_TARGET_SHARED=libldc-runtime-shared.so +LIB_MASK=libldc-runtime*.* CP=cp -f @@ -37,7 +37,7 @@ LC=llvm-ar rsv LLINK=llvm-link LCC=llc CLC=ar rsv -DC=llvmdc +DC=ldc LLC=llvm-as LIB_DEST=.. @@ -60,13 +60,13 @@ LIB_DEST=.. $(DC) -c $(DFLAGS) $< -of$@ .d.html: - $(DC) -c -o- $(DOCFLAGS) -Df$*.html llvmdc.ddoc $< + $(DC) -c -o- $(DOCFLAGS) -Df$*.html ldc.ddoc $< targets : lib sharedlib doc all : lib sharedlib doc -lib : llvmdc.lib llvmdc.bclib llvmdc.clib -sharedlib : llvmdc.sharedlib -doc : llvmdc.doc +lib : ldc.lib ldc.bclib ldc.clib +sharedlib : ldc.sharedlib +doc : ldc.doc ###################################################### OBJ_C= \ @@ -95,9 +95,9 @@ OBJ_UTIL= \ util/string.bc \ util/utf.bc -OBJ_LLVMDC= \ - llvmdc/bitmanip.bc \ - llvmdc/vararg.bc +OBJ_LDC= \ + ldc/bitmanip.bc \ + ldc/vararg.bc OBJ_TI= \ typeinfo/ti_AC.bc \ @@ -140,7 +140,7 @@ ALL_OBJS= \ $(OBJ_BASE) \ $(OBJ_UTIL) \ $(OBJ_TI) \ - $(OBJ_LLVMDC) + $(OBJ_LDC) ###################################################### @@ -148,10 +148,10 @@ ALL_DOCS= ###################################################### -llvmdc.bclib : $(LIB_TARGET_BC_ONLY) -llvmdc.clib : $(LIB_TARGET_C_ONLY) -llvmdc.lib : $(LIB_TARGET_FULL) -llvmdc.sharedlib : $(LIB_TARGET_SHARED) +ldc.bclib : $(LIB_TARGET_BC_ONLY) +ldc.clib : $(LIB_TARGET_C_ONLY) +ldc.lib : $(LIB_TARGET_FULL) +ldc.sharedlib : $(LIB_TARGET_SHARED) $(LIB_TARGET_BC_ONLY) : $(ALL_OBJS) $(RM) $@ @@ -179,7 +179,7 @@ $(LIB_TARGET_SHARED) : $(ALL_OBJS) $(OBJ_C) $(CC) -shared -o $@ $@.o $(OBJ_C) -llvmdc.doc : $(ALL_DOCS) +ldc.doc : $(ALL_DOCS) echo No documentation available. ###################################################### diff --git a/runtime/internal/llvmdc/bitmanip.d b/runtime/internal/llvmdc/bitmanip.d index bc508000d6..24c5e70228 100644 --- a/runtime/internal/llvmdc/bitmanip.d +++ b/runtime/internal/llvmdc/bitmanip.d @@ -1,18 +1,18 @@ /* - * D phobos intrinsics for LLVMDC + * D phobos intrinsics for LDC * * From GDC ... public domain! */ -module llvmdc.bitmanip; +module ldc.bitmanip; // Check for the right compiler -version(LLVMDC) +version(LDC) { // OK } else { - static assert(false, "This module is only valid for LLVMDC"); + static assert(false, "This module is only valid for LDC"); } int bsf(uint v) diff --git a/runtime/internal/llvmdc/vararg.d b/runtime/internal/llvmdc/vararg.d index 48fd96d442..9202cf8db3 100644 --- a/runtime/internal/llvmdc/vararg.d +++ b/runtime/internal/llvmdc/vararg.d @@ -4,16 +4,16 @@ * Provides the functions tango.core.Vararg expects to be present! */ -module llvmdc.Vararg; +module ldc.Vararg; // Check for the right compiler -version(LLVMDC) +version(LDC) { // OK } else { - static assert(false, "This module is only valid for LLVMDC"); + static assert(false, "This module is only valid for LDC"); } alias void* va_list; @@ -26,7 +26,7 @@ void va_start(T) ( out va_list ap, inout T parmn ) T va_arg(T)(ref va_list vp) { T* arg = cast(T*) vp; - // llvmdc always aligns to size_t.sizeof in vararg lists + // ldc always aligns to size_t.sizeof in vararg lists vp = cast(va_list) ( cast(void*) vp + ( ( T.sizeof + size_t.sizeof - 1 ) & ~( size_t.sizeof - 1 ) ) ); return *arg; } diff --git a/runtime/lib/common/tango/llvmdc.mak b/runtime/lib/common/tango/llvmdc.mak index 4d03900eb7..2e6479aec1 100644 --- a/runtime/lib/common/tango/llvmdc.mak +++ b/runtime/lib/common/tango/llvmdc.mak @@ -39,7 +39,7 @@ LC=llvm-ar rsv LLINK=llvm-link LCC=llc CLC=ar rsv -DC=llvmdc +DC=ldc LLC=llvm-as INC_DEST=../../../tango diff --git a/runtime/lib/gc/basic/llvmdc.mak b/runtime/lib/gc/basic/llvmdc.mak index 24d6d28dd5..c1889ab992 100644 --- a/runtime/lib/gc/basic/llvmdc.mak +++ b/runtime/lib/gc/basic/llvmdc.mak @@ -1,4 +1,4 @@ -# Makefile to build the garbage collector D library for LLVMDC +# Makefile to build the garbage collector D library for LDC # Designed to work with GNU make # Targets: # make @@ -39,7 +39,7 @@ LCC=llc LLINK=llvm-link CLC=ar rsv LD=llvm-ld -DC=llvmdc +DC=ldc LIB_DEST=.. diff --git a/runtime/lib/gc/stub/llvmdc.mak b/runtime/lib/gc/stub/llvmdc.mak index 4f49a84f74..8b80261da1 100644 --- a/runtime/lib/gc/stub/llvmdc.mak +++ b/runtime/lib/gc/stub/llvmdc.mak @@ -33,7 +33,7 @@ DOCFLAGS=-version=DDoc CC=gcc LC=llvm-ar rsv -DC=llvmdc +DC=ldc LIB_DEST=.. diff --git a/runtime/lib/llvmdc-posix.mak b/runtime/lib/llvmdc-posix.mak index 2ecd9fcfb0..9291d39498 100644 --- a/runtime/lib/llvmdc-posix.mak +++ b/runtime/lib/llvmdc-posix.mak @@ -10,11 +10,11 @@ # make clean # Delete unneeded files created by build process -LIB_TARGET=libtango-base-llvmdc.a -LIB_MASK=libtango-base-llvmdc*.a -LIB_TARGET_C=libtango-base-c-llvmdc.a -LIB_MASK_C=libtango-base-c-llvmdc*.a -LIB_NAME_NATIVE=libtango-base-llvmdc-native +LIB_TARGET=libtango-base-ldc.a +LIB_MASK=libtango-base-ldc*.a +LIB_TARGET_C=libtango-base-c-ldc.a +LIB_MASK_C=libtango-base-c-ldc*.a +LIB_NAME_NATIVE=libtango-base-ldc-native LIB_TARGET_NATIVE=$(LIB_NAME_NATIVE).a DIR_CC=./common/tango @@ -29,7 +29,7 @@ MD=mkdir -p CC=gcc LC=llvm-ar rsv CLC=ar rsv -DC=llvmdc +DC=ldc LLVMLINK=llvm-link LLC=llc @@ -51,21 +51,21 @@ ALL_DOCS= ###################################################### lib : $(ALL_OBJS) - make -C $(DIR_CC) -fllvmdc.mak lib DC=$(DC) ADD_DFLAGS="$(ADD_DFLAGS)" ADD_CFLAGS="$(ADD_CFLAGS)" - make -C $(DIR_RT) -fllvmdc.mak lib - make -C $(DIR_GC) -fllvmdc.mak lib DC=$(DC) ADD_DFLAGS="$(ADD_DFLAGS)" ADD_CFLAGS="$(ADD_CFLAGS)" + make -C $(DIR_CC) -fldc.mak lib DC=$(DC) ADD_DFLAGS="$(ADD_DFLAGS)" ADD_CFLAGS="$(ADD_CFLAGS)" + make -C $(DIR_RT) -fldc.mak lib + make -C $(DIR_GC) -fldc.mak lib DC=$(DC) ADD_DFLAGS="$(ADD_DFLAGS)" ADD_CFLAGS="$(ADD_CFLAGS)" # could link the three parts into one here, but why should we sharedlib : $(ALL_OBJS) - make -C $(DIR_CC) -fllvmdc.mak sharedlib DC=$(DC) ADD_DFLAGS="$(ADD_DFLAGS)" ADD_CFLAGS="$(ADD_CFLAGS)" - make -C $(DIR_RT) -fllvmdc.mak sharedlib - make -C $(DIR_GC) -fllvmdc.mak sharedlib DC=$(DC) ADD_DFLAGS="$(ADD_DFLAGS)" ADD_CFLAGS="$(ADD_CFLAGS)" + make -C $(DIR_CC) -fldc.mak sharedlib DC=$(DC) ADD_DFLAGS="$(ADD_DFLAGS)" ADD_CFLAGS="$(ADD_CFLAGS)" + make -C $(DIR_RT) -fldc.mak sharedlib + make -C $(DIR_GC) -fldc.mak sharedlib DC=$(DC) ADD_DFLAGS="$(ADD_DFLAGS)" ADD_CFLAGS="$(ADD_CFLAGS)" # could link the three parts into one here, but why should we doc : $(ALL_DOCS) - make -C $(DIR_CC) -fllvmdc.mak doc - make -C $(DIR_RT) -fllvmdc.mak doc - make -C $(DIR_GC) -fllvmdc.mak doc + make -C $(DIR_CC) -fldc.mak doc + make -C $(DIR_RT) -fldc.mak doc + make -C $(DIR_GC) -fldc.mak doc ###################################################### @@ -73,16 +73,16 @@ clean : find . -name "*.di" | xargs $(RM) $(RM) $(ALL_OBJS) $(RM) $(ALL_DOCS) - make -C $(DIR_CC) -fllvmdc.mak clean - make -C $(DIR_RT) -fllvmdc.mak clean - make -C $(DIR_GC) -fllvmdc.mak clean + make -C $(DIR_CC) -fldc.mak clean + make -C $(DIR_RT) -fldc.mak clean + make -C $(DIR_GC) -fldc.mak clean $(RM) $(LIB_MASK) $(RM) $(LIB_MASK_C) $(RM) $(LIB_NAME_NATIVE)* install : - make -C $(DIR_CC) -fllvmdc.mak install - make -C $(DIR_RT) -fllvmdc.mak install - make -C $(DIR_GC) -fllvmdc.mak install + make -C $(DIR_CC) -fldc.mak install + make -C $(DIR_RT) -fldc.mak install + make -C $(DIR_GC) -fldc.mak install $(CP) $(LIB_MASK) $(LIB_DEST)/. $(CP) $(LIB_MASK_C) $(LIB_DEST)/. diff --git a/runtime/llvmdc.diff b/runtime/llvmdc.diff index 1ff49be982..6d2983af9f 100644 --- a/runtime/llvmdc.diff +++ b/runtime/llvmdc.diff @@ -20,9 +20,9 @@ Index: lib/common/tango/core/BitManip.d */ uint outpl( uint port_address, uint value ); } -+else version( LLVMDC ) ++else version( LDC ) +{ -+ public import llvmdc.bitmanip; ++ public import ldc.bitmanip; +} else { @@ -36,7 +36,7 @@ Index: lib/common/tango/core/Thread.d body { - version( D_InlineAsm_X86 ) -+ version( LLVMDC) ++ version( LDC) { + version(X86) + { @@ -67,7 +67,7 @@ Index: lib/common/tango/core/Thread.d } - version( D_InlineAsm_X86 ) -+ version( LLVMDC) ++ version( LDC) { + // nothing to pop + } @@ -173,7 +173,7 @@ Index: lib/unittest.sh - gdc: Builds unittests for gdc + dmd: Builds unittests for dmd + gdc: Builds unittests for gdc -+ llvmdc: Builds unittests for llvmdc ++ ldc: Builds unittests for ldc : Builds unittests for all known compilers.' exit 0 @@ -190,8 +190,8 @@ Index: lib/unittest.sh gdc) GDC=1 ;; -+ llvmdc) -+ LLVMDC=1 ++ ldc) ++ LDC=1 + ;; *) usage @@ -201,11 +201,11 @@ Index: lib/unittest.sh done -if [ ! "$DMD" -a ! "$GDC" ] -+if [ ! "$DMD" -a ! "$GDC" -a ! "$LLVMDC" ] ++if [ ! "$DMD" -a ! "$GDC" -a ! "$LDC" ] then DMD=1 GDC=1 -+ LLVMDC=1 ++ LDC=1 fi if [ "$DMD" = "1" ] @@ -214,9 +214,9 @@ Index: lib/unittest.sh compile gdc runUnitTest_gdc fi - -+if [ "$LLVMDC" = "1" ] ++if [ "$LDC" = "1" ] +then -+ compile llvmdc runUnitTest_llvmdc ++ compile ldc runUnitTest_ldc +fi Index: lib/gc/basic/gcx.d =================================================================== @@ -254,7 +254,7 @@ Index: lib/gc/basic/gcx.d __builtin_unwind_init(); sp = & sp; } -+ else version(LLVMDC) ++ else version(LDC) + { + version(X86) + { @@ -283,7 +283,7 @@ Index: lib/gc/basic/gcx.d { // nothing to do } -+ else version(LLVMDC) ++ else version(LDC) + { + // nothing to do + } @@ -298,7 +298,7 @@ Index: lib/gc/basic/gcbits.d { // use the unoptimized version } -+else version(LLVMDC) ++else version(LDC) +{ + // ditto +} @@ -313,7 +313,7 @@ Index: tango/text/convert/Layout.d alias void* Arg; alias va_list ArgList; } -+else version(LLVMDC) ++else version(LDC) + { + private import tango.core.Vararg; + alias void* Arg; @@ -327,7 +327,7 @@ Index: tango/text/convert/Layout.d assert (arguments.length < 64, "too many args in Layout.convert"); - version (GNU) -+ version (LLVMDC) ++ version (LDC) { Arg[64] arglist = void; + foreach (i, arg; arguments) @@ -350,9 +350,9 @@ Index: tango/core/Vararg.d { public import std.stdarg; } -+else version( LLVMDC ) ++else version( LDC ) +{ -+ public import llvmdc.vararg; ++ public import ldc.vararg; +} else { @@ -365,13 +365,13 @@ Index: tango/core/Atomic.d //////////////////////////////////////////////////////////////////////////////// -+// LLVMDC Atomics Implementation ++// LDC Atomics Implementation +//////////////////////////////////////////////////////////////////////////////// + + -+else version( LLVMDC ) ++else version( LDC ) +{ -+ import llvmdc.intrinsics; ++ import ldc.intrinsics; + + + //////////////////////////////////////////////////////////////////////////// @@ -537,12 +537,12 @@ Index: tango/math/Math.d version = DigitalMars_D_InlineAsm_X86; } } -+else version(LLVMDC) ++else version(LDC) +{ -+ import llvmdc.intrinsics; ++ import ldc.intrinsics; + version(X86) + { -+ version = LLVMDC_X86; ++ version = LDC_X86; + } +} @@ -552,7 +552,7 @@ Index: tango/math/Math.d * Bugs: * Results are undefined if |x| >= $(POWER 2,64). */ -+version(LLVMDC) ++version(LDC) +{ + alias llvm_cos_f32 cos; + alias llvm_cos_f64 cos; @@ -585,7 +585,7 @@ Index: tango/math/Math.d * Bugs: * Results are undefined if |x| >= $(POWER 2,64). */ -+version(LLVMDC) ++version(LDC) +{ + alias llvm_sin_f32 sin; + alias llvm_sin_f64 sin; @@ -620,7 +620,7 @@ Index: tango/math/Math.d return tanl(x); - } else { + } -+ else version(LLVMDC) { ++ else version(LDC) { + return tango.stdc.math.tanl(x); + } + else { @@ -631,7 +631,7 @@ Index: tango/math/Math.d * +∞ +∞ no * ) */ -+version(LLVMDC) ++version(LDC) +{ + alias llvm_sqrt_f32 sqrt; + alias llvm_sqrt_f64 sqrt; @@ -667,7 +667,7 @@ Index: tango/math/Math.d } } - return tango.stdc.math.powl(x, y); -+ version(LLVMDC_X86) ++ version(LDC_X86) + { + return llvm_pow_f80(x, y); + } @@ -686,7 +686,7 @@ Index: tango/stdc/stdlib.d { void* alloca(size_t size); } -+else version( LLVMDC ) ++else version( LDC ) +{ + pragma(alloca) + void* alloca(size_t size); @@ -702,9 +702,9 @@ Index: tango/stdc/stdarg.d { public import std.c.stdarg; } -+else version( LLVMDC ) ++else version( LDC ) +{ -+ public import llvmdc.cstdarg; ++ public import ldc.cstdarg; +} else { diff --git a/runtime/patch-tango.sh b/runtime/patch-tango.sh index cbbc011d79..a9edf79016 100755 --- a/runtime/patch-tango.sh +++ b/runtime/patch-tango.sh @@ -1,4 +1,4 @@ #!/bin/bash cd ../tango -patch -p0 < ../runtime/llvmdc.diff +patch -p0 < ../runtime/ldc.diff diff --git a/tests/README b/tests/README index 51f2d46525..87f4922abd 100644 --- a/tests/README +++ b/tests/README @@ -1,6 +1,6 @@ -After making sure llvmdc and its runtime are up to date, use +After making sure LDC and its runtime are up to date, use ./runtest tmp-sensible-name -to run tests for llvmdc. +to run tests for LDC. Move into reference/ subfolder and add to svn if desired. Use @@ -8,4 +8,4 @@ Use to find changes. Recommended for comparing to DMD: -./findregressions reference/dmd-version llvmdc-something | grep -v "PASS -> XFAIL" | sort > tmp-new-regressions +./findregressions reference/dmd-version ldc-something | grep -v "PASS -> XFAIL" | sort > tmp-new-regressions diff --git a/tests/makewebstatistics.d b/tests/makewebstatistics.d index a3c8cfb315..30ded68457 100644 --- a/tests/makewebstatistics.d +++ b/tests/makewebstatistics.d @@ -337,7 +337,7 @@ int main(char[][] args){ if(args.length < 3 || (args[1] == "--regenerate" && args.length < 4)){ fwritefln(stderr, "%s [--regenerate] ...", args[0]); - fwritefln(stderr, "bash example: %s reference/dmd-something $(ls reference/llvmdc*)", args[0]); + fwritefln(stderr, "bash example: %s reference/dmd-something $(ls reference/ldc*)", args[0]); return 1; } @@ -377,119 +377,119 @@ int main(char[][] args){ BufferedFile index = new BufferedFile(std.path.join(basedir, "index.html"), FileMode.OutNew); scope(exit) index.close(); index.writefln(` - - - - DStress results for x86-32 Linux - - - - -

DStress results for x86-32 Linux

- -

Legend

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + DStress results for x86-32 Linux + + + + +

DStress results for x86-32 Linux

+ +

Legend

+
ColorDescription
PASSTest passed and was expected to pass
XFAILTest failed and expected to fail
FAILTest failed but was expected to pass
XPASSTest passed but was expected to fail
ERRORThe compiler, linker or the test segfaulted
+Changes from FAIL, XPASS or ERROR to PASS or XFAIL
-Changes from PASS or XFAIL to FAIL, XPASS or ERROR
chgChanged within the good or bad group without crossing over
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ColorDescription
PASSTest passed and was expected to pass
XFAILTest failed and expected to fail
FAILTest failed but was expected to pass
XPASSTest passed but was expected to fail
ERRORThe compiler, linker or the test segfaulted
+Changes from FAIL, XPASS or ERROR to PASS or XFAIL
-Changes from PASS or XFAIL to FAIL, XPASS or ERROR
chgChanged within the good or bad group without crossing over

Results

diff --git a/tests/mini/classes6.d b/tests/mini/classes6.d index 3cf76ae0ef..0a67662d44 100644 --- a/tests/mini/classes6.d +++ b/tests/mini/classes6.d @@ -24,7 +24,7 @@ extern(C) int rand(); } -import llvmdc.intrinsics; +import ldc.intrinsics; void main() { diff --git a/tests/mini/intrinsics.d b/tests/mini/intrinsics.d index 1402405273..85f44a3b94 100644 --- a/tests/mini/intrinsics.d +++ b/tests/mini/intrinsics.d @@ -1,4 +1,4 @@ -import llvmdc.intrinsics; +import ldc.intrinsics; extern(C) int printf(char*,...); extern(C) int scanf(char*,...); diff --git a/tests/runminitest.d b/tests/runminitest.d index 223aa40dae..4049425266 100644 --- a/tests/runminitest.d +++ b/tests/runminitest.d @@ -49,7 +49,7 @@ int main(string[] args) auto testname = getName(getBaseName(c)); writefln("TEST NAME: ", testname); - string cmd = format("llvmdc %s -quiet -ofobj" ~ std.path.sep ~ "%s -odobj", c, testname); + string cmd = format("ldc %s -quiet -ofobj" ~ std.path.sep ~ "%s -odobj", c, testname); foreach(v; args[1..$]) { cmd ~= ' '; cmd ~= v; diff --git a/tests/runtest b/tests/runtest index b749558d12..1a6c1eaf9f 100755 --- a/tests/runtest +++ b/tests/runtest @@ -37,8 +37,8 @@ echo "Remember to make sure you have an up to date runtime!" echo if [ -z "$DMD" ] ; then - echo "Testing with llvmdc. Set DMD environment variable to select compiler." - DMD="llvmdc -I$BASEPATH/testincludes -L$BASEPATH/testincludes/libtangobos-partial.a" + echo "Testing with LDC. Set DMD environment variable to select compiler." + DMD="ldc -I$BASEPATH/testincludes -L$BASEPATH/testincludes/libtangobos-partial.a" echo "Default is $DMD" else echo "Using compiler given by DMD environment variable: $DMD" diff --git a/tests/testincludes/Makefile b/tests/testincludes/Makefile index f40a35055e..b0f3d0f896 100644 --- a/tests/testincludes/Makefile +++ b/tests/testincludes/Makefile @@ -34,7 +34,7 @@ DOCFLAGS=-version=DDoc CC=gcc LC=llvm-ar rsv CLC=ar rsv -DC=llvmdc +DC=ldc LLC=llvm-as LLVMLINK=llvm-link LLC=llc