First part of rename to LDC.

This commit is contained in:
Christian Kamm 2008-10-06 22:46:55 +02:00
parent 1fe1354a8a
commit 6eeeafdba6
47 changed files with 350 additions and 350 deletions

View file

@ -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

View file

@ -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)

View file

@ -1 +1 @@
use rebuild with -dc=llvmdc-posix to build the demos
use rebuild with -dc=ldc-posix to build the demos

View file

@ -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
}
}

View file

@ -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

View file

@ -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");

View file

@ -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;

View file

@ -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" },

View file

@ -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(&params, 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");

View file

@ -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

View file

@ -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;
};

View file

@ -9,5 +9,5 @@ enum
LLVMva_copy,
LLVMva_end,
LLVMva_arg,
LLVMllvmdc
LLVMldc
};

View file

@ -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)

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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)) {

View file

@ -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;
}

View file

@ -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

View file

@ -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"

View file

@ -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

View file

@ -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") }

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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;

View file

@ -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");
}
//

View file

@ -1,4 +1,4 @@
private import llvmdc.intrinsics;
private import ldc.intrinsics;
extern(C):

View file

@ -5,7 +5,7 @@
module eh;
import util.console;
import llvmdc.cstdarg;
import ldc.cstdarg;
// debug = EH_personality;

View file

@ -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");

View file

@ -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.
######################################################

View file

@ -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)

View file

@ -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;
}

View file

@ -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

View file

@ -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=..

View file

@ -33,7 +33,7 @@ DOCFLAGS=-version=DDoc
CC=gcc
LC=llvm-ar rsv
DC=llvmdc
DC=ldc
LIB_DEST=..

View file

@ -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)/.

View file

@ -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
<none>: 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
* <tr> <td> +&infin; <td> +&infin; <td> 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
{

View file

@ -1,4 +1,4 @@
#!/bin/bash
cd ../tango
patch -p0 < ../runtime/llvmdc.diff
patch -p0 < ../runtime/ldc.diff

View file

@ -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

View file

@ -337,7 +337,7 @@ int main(char[][] args){
if(args.length < 3 || (args[1] == "--regenerate" && args.length < 4)){
fwritefln(stderr, "%s [--regenerate] <reference-log> <log> <log> ...", 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;
}

View file

@ -24,7 +24,7 @@ extern(C)
int rand();
}
import llvmdc.intrinsics;
import ldc.intrinsics;
void main()
{

View file

@ -1,4 +1,4 @@
import llvmdc.intrinsics;
import ldc.intrinsics;
extern(C) int printf(char*,...);
extern(C) int scanf(char*,...);

View file

@ -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;

View file

@ -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"

View file

@ -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