diff --git a/LICENSE b/LICENSE index f52b3abd..410ed7ea 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -LLVMDC is released under the "three-clause BSD" license reproduced below with +LDC is released under the "three-clause BSD" license reproduced below with the following exceptions: The DMD frontend in dmd/* is originally written by Walter Bright and released @@ -10,7 +10,7 @@ the GPL version 2 or later. -- "three-clause BSD" -- -Copyright (c) 2007-2008 LLVMDC Team. +Copyright (c) 2007-2008 LDC Team. All rights reserved. Redistribution and use in source and binary forms, with or without modification, @@ -21,7 +21,7 @@ are permitted provided that the following conditions are met: * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the name of the LLVMDC Team nor the names of its contributors may be + * Neither the name of the LDC Team nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/demos/ray.d b/demos/ray.d index c1b477c3..1b7f0e24 100644 --- a/demos/ray.d +++ b/demos/ray.d @@ -13,7 +13,7 @@ int atoi(char[] s) { return !neg ? i : -i; } -version(LLVMDC) +version(LDC) { pragma(intrinsic, "llvm.sqrt.f64") double sqrt(double val); diff --git a/dmd/arrayop.c b/dmd/arrayop.c index 5445e8af..aa66c70d 100644 --- a/dmd/arrayop.c +++ b/dmd/arrayop.c @@ -308,7 +308,7 @@ Expression *BinExp::arrayOp(Scope *sc) else { /* In library, refer to it. */ - // LLVMDC FIXME + // LDC FIXME fd = FuncDeclaration::genCfunc(NULL, type, name); } sv->ptrvalue = fd; // cache symbol in hash table diff --git a/dmd/cast.c b/dmd/cast.c index 60e05735..1ed3b1b1 100644 --- a/dmd/cast.c +++ b/dmd/cast.c @@ -1183,7 +1183,7 @@ Expression *BinExp::scaleFactor(Scope *sc) stride = t1b->nextOf()->size(loc); if (!t->equals(t2b)) e2 = e2->castTo(sc, t); - // LLVMDC: llvm uses typesafe pointer arithmetic + // LDC: llvm uses typesafe pointer arithmetic #if !IN_LLVM if (t1b->next->isbit()) // BUG: should add runtime check for misaligned offsets diff --git a/dmd/cond.c b/dmd/cond.c index d605cdf6..c2c32cbd 100644 --- a/dmd/cond.c +++ b/dmd/cond.c @@ -127,7 +127,7 @@ void VersionCondition::checkPredefined(Loc loc, char *ident) { static char* reserved[] = { - "DigitalMars", "LLVM", "LLVMDC", "LLVM64", + "DigitalMars", "LLVM", "LDC", "LLVM64", "X86", "X86_64", "PPC", "PPC64", "Windows", "Win32", "Win64", "linux", "darwin", "Posix", diff --git a/dmd/expression.c b/dmd/expression.c index 808eff3b..58b00960 100644 --- a/dmd/expression.c +++ b/dmd/expression.c @@ -267,7 +267,7 @@ Expression *getRightThis(Loc loc, Scope *sc, AggregateDeclaration *ad, //printf("rewriting e1 to %s's this\n", f->toChars()); n++; - // LLVMDC seems dmd misses it sometimes here :/ + // LDC seems dmd misses it sometimes here :/ f->vthis->nestedref = 1; e1 = new VarExp(loc, f->vthis); @@ -3756,7 +3756,7 @@ Expression *VarExp::semantic(Scope *sc) #endif } - // LLVMDC: Fixes bug 1161, http://d.puremagic.com/issues/show_bug.cgi?id=1161 + // LDC: Fixes bug 1161, http://d.puremagic.com/issues/show_bug.cgi?id=1161 // check access to VarDeclaration accessCheck(loc, sc, NULL, var); @@ -5555,7 +5555,7 @@ Expression *DelegateExp::semantic(Scope *sc) if (!type) { e1 = e1->semantic(sc); - // LLVMDC we need a copy as we store the LLVM tpye in TypeFunction, and delegate/members have different types for 'this' + // LDC we need a copy as we store the LLVM tpye in TypeFunction, and delegate/members have different types for 'this' type = new TypeDelegate(func->type->syntaxCopy()); type = type->semantic(loc, sc); AggregateDeclaration *ad = func->toParent()->isAggregateDeclaration(); @@ -6223,7 +6223,7 @@ Expression *AddrExp::semantic(Scope *sc) FuncDeclaration *f = dve->var->isFuncDeclaration(); VarDeclaration *v = dve->var->isVarDeclaration(); - // LLVMDC + // LDC if (f && f->isIntrinsic()) { error("cannot take the address of intrinsic function %s", e1->toChars()); @@ -7843,7 +7843,7 @@ Expression *ShlAssignExp::semantic(Scope *sc) e1->checkIntegral(); e2 = e2->checkIntegral(); //e2 = e2->castTo(sc, Type::tshiftcnt); - e2 = e2->castTo(sc, e1->type); // LLVMDC + e2 = e2->castTo(sc, e1->type); // LDC return this; } @@ -7872,7 +7872,7 @@ Expression *ShrAssignExp::semantic(Scope *sc) e1->checkIntegral(); e2 = e2->checkIntegral(); //e2 = e2->castTo(sc, Type::tshiftcnt); - e2 = e2->castTo(sc, e1->type); // LLVMDC + e2 = e2->castTo(sc, e1->type); // LDC return this; } @@ -7901,7 +7901,7 @@ Expression *UshrAssignExp::semantic(Scope *sc) e1->checkIntegral(); e2 = e2->checkIntegral(); //e2 = e2->castTo(sc, Type::tshiftcnt); - e2 = e2->castTo(sc, e1->type); // LLVMDC + e2 = e2->castTo(sc, e1->type); // LDC return this; } @@ -8389,7 +8389,7 @@ Expression *ShlExp::semantic(Scope *sc) e2 = e2->checkIntegral(); e1 = e1->integralPromotions(sc); //e2 = e2->castTo(sc, Type::tshiftcnt); - e2 = e2->castTo(sc, e1->type); // LLVMDC + e2 = e2->castTo(sc, e1->type); // LDC type = e1->type; } return this; @@ -8414,7 +8414,7 @@ Expression *ShrExp::semantic(Scope *sc) e2 = e2->checkIntegral(); e1 = e1->integralPromotions(sc); //e2 = e2->castTo(sc, Type::tshiftcnt); - e2 = e2->castTo(sc, e1->type); // LLVMDC + e2 = e2->castTo(sc, e1->type); // LDC type = e1->type; } return this; @@ -8439,7 +8439,7 @@ Expression *UshrExp::semantic(Scope *sc) e2 = e2->checkIntegral(); e1 = e1->integralPromotions(sc); //e2 = e2->castTo(sc, Type::tshiftcnt); - e2 = e2->castTo(sc, e1->type); // LLVMDC + e2 = e2->castTo(sc, e1->type); // LDC type = e1->type; } return this; @@ -9092,7 +9092,7 @@ void CondExp::toCBuffer(OutBuffer *buf, HdrGenState *hgs) #if IN_LLVM -// Strictly LLVMDC specific stuff +// Strictly LDC specific stuff GEPExp::GEPExp(Loc loc, Expression* e, Identifier* id, unsigned idx) : UnaExp(loc, TOKgep, sizeof(GEPExp), e) diff --git a/dmd/expression.h b/dmd/expression.h index 28bc78c2..8ccc3527 100644 --- a/dmd/expression.h +++ b/dmd/expression.h @@ -158,7 +158,7 @@ struct Expression : Object // Back end virtual elem *toElem(IRState *irs); virtual dt_t **toDt(dt_t **pdt); - // LLVMDC + // LDC virtual llvm::Constant *toConstElem(IRState *irs); }; @@ -185,7 +185,7 @@ struct IntegerExp : Expression Expression *toLvalue(Scope *sc, Expression *e); elem *toElem(IRState *irs); dt_t **toDt(dt_t **pdt); - // LLVMDC + // LDC virtual llvm::Constant *toConstElem(IRState *irs); }; @@ -210,7 +210,7 @@ struct RealExp : Expression void toMangleBuffer(OutBuffer *buf); elem *toElem(IRState *irs); dt_t **toDt(dt_t **pdt); - // LLVMDC + // LDC virtual llvm::Constant *toConstElem(IRState *irs); }; @@ -238,7 +238,7 @@ struct ComplexExp : Expression #endif elem *toElem(IRState *irs); dt_t **toDt(dt_t **pdt); - // LLVMDC + // LDC virtual llvm::Constant *toConstElem(IRState *irs); }; @@ -317,7 +317,7 @@ struct NullExp : Expression Expression *interpret(InterState *istate); elem *toElem(IRState *irs); dt_t **toDt(dt_t **pdt); - // LLVMDC + // LDC virtual llvm::Constant *toConstElem(IRState *irs); }; @@ -347,7 +347,7 @@ struct StringExp : Expression void toMangleBuffer(OutBuffer *buf); elem *toElem(IRState *irs); dt_t **toDt(dt_t **pdt); - // LLVMDC + // LDC virtual llvm::Constant *toConstElem(IRState *irs); }; @@ -400,7 +400,7 @@ struct ArrayLiteralExp : Expression int inlineCost(InlineCostState *ics); Expression *doInline(InlineDoState *ids); Expression *inlineScan(InlineScanState *iss); - // LLVMDC + // LDC virtual llvm::Constant *toConstElem(IRState *irs); }; @@ -427,7 +427,7 @@ struct AssocArrayLiteralExp : Expression int inlineCost(InlineCostState *ics); Expression *doInline(InlineDoState *ids); Expression *inlineScan(InlineScanState *iss); - // LLVMDC + // LDC virtual llvm::Constant *toConstElem(IRState *irs); }; @@ -460,7 +460,7 @@ struct StructLiteralExp : Expression int inlineCost(InlineCostState *ics); Expression *doInline(InlineDoState *ids); Expression *inlineScan(InlineScanState *iss); - // LLVMDC + // LDC virtual llvm::Constant *toConstElem(IRState *irs); }; @@ -594,7 +594,7 @@ struct VarExp : Expression int inlineCost(InlineCostState *ics); Expression *doInline(InlineDoState *ids); //Expression *inlineScan(InlineScanState *iss); - // LLVMDC + // LDC virtual llvm::Constant *toConstElem(IRState *irs); }; @@ -826,7 +826,7 @@ struct DotVarExp : UnaExp void dump(int indent); elem *toElem(IRState *irs); - //LLVMDC: since we don't convert abc.def -> *(&abc + ABC.def.offsetof) + //LDC: since we don't convert abc.def -> *(&abc + ABC.def.offsetof) // these are needed Expression *optimize(int result); Expression *interpret(InterState *istate); @@ -901,7 +901,7 @@ struct AddrExp : UnaExp MATCH implicitConvTo(Type *t); Expression *castTo(Scope *sc, Type *t); Expression *optimize(int result); - // LLVMDC + // LDC virtual llvm::Constant *toConstElem(IRState *irs); }; @@ -1004,7 +1004,7 @@ struct CastExp : UnaExp // For operator overloading Identifier *opId(); - // LLVMDC + // LDC virtual llvm::Constant *toConstElem(IRState *irs); }; @@ -1501,7 +1501,7 @@ struct LineInitExp : DefaultInitExp #if IN_LLVM -// this stuff is strictly LLVMDC +// this stuff is strictly LDC struct GEPExp : UnaExp { diff --git a/dmd/func.c b/dmd/func.c index 74caab5d..83b9c1de 100644 --- a/dmd/func.c +++ b/dmd/func.c @@ -94,7 +94,7 @@ Dsymbol *FuncDeclaration::syntaxCopy(Dsymbol *s) f->fbody = fbody ? fbody->syntaxCopy() : NULL; assert(!fthrows); // deprecated - // LLVMDC + // LDC f->intrinsicName = intrinsicName; return f; @@ -2020,7 +2020,7 @@ int FuncDeclaration::addPostInvariant() */ // -// LLVMDC: Adjusted to give argument info to the runtime function decl. +// LDC: Adjusted to give argument info to the runtime function decl. // FuncDeclaration *FuncDeclaration::genCfunc(Arguments *args, Type *treturn, char *name) diff --git a/dmd/lexer.c b/dmd/lexer.c index c24060a6..d9f583b5 100644 --- a/dmd/lexer.c +++ b/dmd/lexer.c @@ -702,7 +702,7 @@ void Lexer::scan(Token *t) } else if (id == Id::VENDOR) { - t->ustring = (unsigned char *)"LLVMDC"; + t->ustring = (unsigned char *)"LDC"; goto Lstring; } else if (id == Id::TIMESTAMP) diff --git a/dmd/lexer.h b/dmd/lexer.h index fd75864c..ec30795f 100644 --- a/dmd/lexer.h +++ b/dmd/lexer.h @@ -161,7 +161,7 @@ enum TOK TOKshared, #endif -// LLVMDC specific +// LDC specific #if IN_LLVM TOKgep, #endif diff --git a/dmd/module.c b/dmd/module.c index 78e41f5b..f603c386 100644 --- a/dmd/module.c +++ b/dmd/module.c @@ -122,7 +122,7 @@ Module::Module(char *filename, Identifier *ident, int doDocComment, int doHdrGen } srcfile = new File(srcfilename); - // LLVMDC + // LDC llvmForceLogging = false; this->doDocComment = doDocComment; this->doHdrGen = doHdrGen; diff --git a/dmd/module.h b/dmd/module.h index 8fcd4824..1deaef95 100644 --- a/dmd/module.h +++ b/dmd/module.h @@ -169,7 +169,7 @@ struct Module : Package Symbol *toSymbol(); void genmoduleinfo(); - // LLVMDC + // LDC void buildTargetFiles(); File* buildFilePath(char* forcename, char* path, char* ext); Module *isModule() { return this; } diff --git a/dmd/mtype.c b/dmd/mtype.c index 63e2efdd..52b4f3c7 100644 --- a/dmd/mtype.c +++ b/dmd/mtype.c @@ -103,7 +103,7 @@ ClassDeclaration *Type::typeinfofunction; ClassDeclaration *Type::typeinfodelegate; ClassDeclaration *Type::typeinfotypelist; -// LLVMDC +// LDC Type* Type::topaque; Type *Type::tvoidptr; @@ -210,7 +210,7 @@ void Type::init() mangleChar[Ttuple] = 'B'; mangleChar[Tslice] = '@'; - // LLVMDC + // LDC mangleChar[Topaque] = 'O'; for (i = 0; i < TMAX; i++) @@ -234,7 +234,7 @@ void Type::init() tvoidptr = tvoid->pointerTo(); - // LLVMDC + // LDC topaque = new TypeOpaque(); // set size_t / ptrdiff_t types and pointer size @@ -726,7 +726,7 @@ Identifier *Type::getTypeInfoIdent(int internal) name = (char *)alloca(19 + sizeof(len) * 3 + len + 1); buf.writeByte(0); sprintf(name, "_D%dTypeInfo_%s6__initZ", 9 + len, buf.data); -// LLVMDC +// LDC // it is not clear where the underscore that's stripped here is added back in // if (global.params.isWindows) // name++; // C mangling will add it back in @@ -1002,7 +1002,7 @@ unsigned TypeBasic::alignsize() switch (ty) { -//LLVMDC: llvm aligns 12 byte reals to 4 byte +//LDC: llvm aligns 12 byte reals to 4 byte case Tfloat80: case Timaginary80: case Tcomplex80: @@ -1010,7 +1010,7 @@ unsigned TypeBasic::alignsize() sz = 4; break; -//LLVMDC: llvm aligns these to 4 byte boundaries +//LDC: llvm aligns these to 4 byte boundaries case Tint64: case Tuns64: case Tfloat64: @@ -1554,7 +1554,7 @@ Expression *TypeArray::dotExp(Scope *sc, Expression *e, Identifier *ident) Expression *ec; Expressions *arguments; - //LLVMDC: Build arguments. + //LDC: Build arguments. static FuncDeclaration *adReverseChar_fd = NULL; if(!adReverseChar_fd) { Arguments* args = new Arguments; @@ -1585,7 +1585,7 @@ Expression *TypeArray::dotExp(Scope *sc, Expression *e, Identifier *ident) Expression *ec; Expressions *arguments; - //LLVMDC: Build arguments. + //LDC: Build arguments. static FuncDeclaration *adSortChar_fd = NULL; if(!adSortChar_fd) { Arguments* args = new Arguments; @@ -1620,7 +1620,7 @@ Expression *TypeArray::dotExp(Scope *sc, Expression *e, Identifier *ident) assert(size); dup = (ident == Id::dup); - //LLVMDC: Build arguments. + //LDC: Build arguments. static FuncDeclaration *adDup_fd = NULL; if(!adDup_fd) { Arguments* args = new Arguments; @@ -1656,7 +1656,7 @@ Expression *TypeArray::dotExp(Scope *sc, Expression *e, Identifier *ident) Expressions *arguments; bool isBit = (n->ty == Tbit); - //LLVMDC: Build arguments. + //LDC: Build arguments. static FuncDeclaration *adSort_fd = NULL; if(!adSort_fd) { Arguments* args = new Arguments; @@ -1680,7 +1680,7 @@ Expression *TypeArray::dotExp(Scope *sc, Expression *e, Identifier *ident) arguments = new Expressions(); arguments->push(e); if (next->ty != Tbit) - arguments->push(n->getTypeInfo(sc)); // LLVMDC, we don't support the getInternalTypeInfo + arguments->push(n->getTypeInfo(sc)); // LDC, we don't support the getInternalTypeInfo // optimization arbitrarily, not yet at least... e = new CallExp(e->loc, ec, arguments); e->type = next->arrayOf(); @@ -2346,7 +2346,7 @@ Expression *TypeAArray::dotExp(Scope *sc, Expression *e, Identifier *ident) Expression *ec; Expressions *arguments; - //LLVMDC: Build arguments. + //LDC: Build arguments. static FuncDeclaration *aaLen_fd = NULL; if(!aaLen_fd) { Arguments* args = new Arguments; @@ -2367,7 +2367,7 @@ Expression *TypeAArray::dotExp(Scope *sc, Expression *e, Identifier *ident) int size = key->size(e->loc); assert(size); - //LLVMDC: Build arguments. + //LDC: Build arguments. static FuncDeclaration *aaKeys_fd = NULL; if(!aaKeys_fd) { Arguments* args = new Arguments; @@ -2388,7 +2388,7 @@ Expression *TypeAArray::dotExp(Scope *sc, Expression *e, Identifier *ident) Expression *ec; Expressions *arguments; - //LLVMDC: Build arguments. + //LDC: Build arguments. static FuncDeclaration *aaValues_fd = NULL; if(!aaValues_fd) { Arguments* args = new Arguments; @@ -2413,7 +2413,7 @@ Expression *TypeAArray::dotExp(Scope *sc, Expression *e, Identifier *ident) Expression *ec; Expressions *arguments; - //LLVMDC: Build arguments. + //LDC: Build arguments. static FuncDeclaration *aaRehash_fd = NULL; if(!aaRehash_fd) { Arguments* args = new Arguments; @@ -4465,7 +4465,7 @@ L1: // *(&e + offset) accessCheck(e->loc, sc, e, d); -// LLVMDC we don't want dot exprs turned into pointer arithmetic. it complicates things for no apparent gain +// LDC we don't want dot exprs turned into pointer arithmetic. it complicates things for no apparent gain #ifndef IN_LLVM b = new AddrExp(e->loc, e); b->type = e->type->pointerTo(); @@ -4730,7 +4730,7 @@ L1: e = new PtrExp(e->loc, e, t); } -#endif // !LLVMDC +#endif // !LDC return e; } diff --git a/dmd/statement.c b/dmd/statement.c index aa441c04..fcaf6c76 100644 --- a/dmd/statement.c +++ b/dmd/statement.c @@ -1598,7 +1598,7 @@ Statement *ForeachStatement::semantic(Scope *sc) /* Call: * _aaApply(aggr, keysize, flde) */ - //LLVMDC: Build arguments. + //LDC: Build arguments. static FuncDeclaration *aaApply2_fd = NULL; if(!aaApply2_fd) { Arguments* args = new Arguments; @@ -1667,7 +1667,7 @@ Statement *ForeachStatement::semantic(Scope *sc) const char *r = (op == TOKforeach_reverse) ? "R" : ""; int j = sprintf(fdname, "_aApply%s%.*s%d", r, 2, fntab[flag], dim); assert(j < sizeof(fdname)); - //LLVMDC: Build arguments. + //LDC: Build arguments. Arguments* args = new Arguments; args->push(new Argument(STCin, Type::topaque->arrayOf(), NULL, NULL)); if (dim == 2) { @@ -2243,7 +2243,7 @@ SwitchStatement::SwitchStatement(Loc loc, Expression *c, Statement *b) sdefault = NULL; cases = NULL; hasNoDefault = 0; - // LLVMDC + // LDC enclosinghandler = NULL; } @@ -3200,7 +3200,7 @@ SynchronizedStatement::SynchronizedStatement(Loc loc, Expression *exp, Statement this->body = body; this->esync = NULL; this->enclosinghandler = NULL; - // LLVMDC + // LDC this->llsync = NULL; } @@ -3211,7 +3211,7 @@ SynchronizedStatement::SynchronizedStatement(Loc loc, elem *esync, Statement *bo this->body = body; this->esync = esync; this->enclosinghandler = NULL; - // LLVMDC + // LDC this->llsync = NULL; } @@ -3961,7 +3961,7 @@ Statement *LabelStatement::semantic(Scope *sc) statement = statement->semantic(sc); sc->pop(); - // LLVMDC put in labmap + // LDC put in labmap fd->labmap[ident->toChars()] = this; return this; diff --git a/dmd/statement.h b/dmd/statement.h index 436f6d13..a884b926 100644 --- a/dmd/statement.h +++ b/dmd/statement.h @@ -94,7 +94,7 @@ enum BE BEany = (BEfallthru | BEthrow | BEreturn | BEgoto | BEhalt), }; -// LLVMDC this is used for tracking try-finally, synchronized and volatile scopes +// LDC this is used for tracking try-finally, synchronized and volatile scopes // definitions in gen/llvmhelpers.cpp struct EnclosingHandler : Object { @@ -544,7 +544,7 @@ struct CaseStatement : Statement CaseStatement* isCaseStatement() { return this; } - // LLVMDC + // LDC llvm::BasicBlock* bodyBB; llvm::ConstantInt* llvmIdx; }; @@ -570,7 +570,7 @@ struct DefaultStatement : Statement void toIR(IRState *irs); - // LLVMDC + // LDC llvm::BasicBlock* bodyBB; }; @@ -655,7 +655,7 @@ struct BreakStatement : Statement void toIR(IRState *irs); - // LLVMDC: only set if ident is set: label statement to jump to + // LDC: only set if ident is set: label statement to jump to LabelStatement *target; }; @@ -674,7 +674,7 @@ struct ContinueStatement : Statement void toIR(IRState *irs); - // LLVMDC: only set if ident is set: label statement to jump to + // LDC: only set if ident is set: label statement to jump to LabelStatement *target; }; @@ -871,7 +871,7 @@ struct LabelStatement : Statement void toIR(IRState *irs); - // LLVMDC + // LDC bool asmLabel; // for labels inside inline assembler }; @@ -903,7 +903,7 @@ struct AsmStatement : Statement void toIR(IRState *irs); - // LLVMDC + // LDC // non-zero if this is a branch, contains the target labels identifier Identifier* isBranchToLabel; }; diff --git a/dmd/template.c b/dmd/template.c index bd8cb52a..fa3855c7 100644 --- a/dmd/template.c +++ b/dmd/template.c @@ -304,7 +304,7 @@ Dsymbol *TemplateDeclaration::syntaxCopy(Dsymbol *) d = Dsymbol::arraySyntaxCopy(members); td = new TemplateDeclaration(loc, ident, p, d); - // LLVMDC + // LDC td->intrinsicName = intrinsicName; return td; diff --git a/dmd/template.h b/dmd/template.h index bf766ddc..9a831c26 100644 --- a/dmd/template.h +++ b/dmd/template.h @@ -86,7 +86,7 @@ struct TemplateDeclaration : ScopeDsymbol TemplateTupleParameter *isVariadic(); int isOverloadable(); - // LLVMDC + // LDC std::string intrinsicName; }; @@ -315,7 +315,7 @@ struct TemplateInstance : ScopeDsymbol TemplateInstance *isTemplateInstance() { return this; } AliasDeclaration *isAliasDeclaration(); - // LLVMDC + // LDC TemplateInstance *tinst; // enclosing template instance void printInstantiationTrace(); }; diff --git a/gen/aa.h b/gen/aa.h index 5afec0a5..9ae11ada 100644 --- a/gen/aa.h +++ b/gen/aa.h @@ -1,8 +1,8 @@ -#ifndef LLVMDC_GEN_AA_H -#define LLVMDC_GEN_AA_H +#ifndef LDC_GEN_AA_H +#define LDC_GEN_AA_H DValue* DtoAAIndex(Loc& loc, Type* type, DValue* aa, DValue* key, bool lvalue); DValue* DtoAAIn(Loc& loc, Type* type, DValue* aa, DValue* key); void DtoAARemove(Loc& loc, DValue* aa, DValue* key); -#endif // LLVMDC_GEN_AA_H +#endif // LDC_GEN_AA_H diff --git a/gen/classes.h b/gen/classes.h index 594efc56..572bac5a 100644 --- a/gen/classes.h +++ b/gen/classes.h @@ -1,5 +1,5 @@ -#ifndef LLVMDC_GEN_CLASSES_H -#define LLVMDC_GEN_CLASSES_H +#ifndef LDC_GEN_CLASSES_H +#define LDC_GEN_CLASSES_H #include "gen/structs.h" diff --git a/gen/complex.h b/gen/complex.h index 34b0e5da..e835cdb5 100644 --- a/gen/complex.h +++ b/gen/complex.h @@ -1,5 +1,5 @@ -#ifndef LLVMDC_GEN_COMPLEX_H -#define LLVMDC_GEN_COMPLEX_H +#ifndef LDC_GEN_COMPLEX_H +#define LDC_GEN_COMPLEX_H const llvm::StructType* DtoComplexType(Type* t); const LLType* DtoComplexBaseType(Type* t); @@ -26,4 +26,4 @@ LLValue* DtoComplexEquals(Loc& loc, TOK op, DValue* lhs, DValue* rhs); DValue* DtoCastComplex(Loc& loc, DValue* val, Type* to); -#endif // LLVMDC_GEN_COMPLEX_H +#endif // LDC_GEN_COMPLEX_H diff --git a/gen/dvalue.h b/gen/dvalue.h index 60d081e1..71e78a37 100644 --- a/gen/dvalue.h +++ b/gen/dvalue.h @@ -1,5 +1,5 @@ -#ifndef LLVMDC_GEN_DVALUE_H -#define LLVMDC_GEN_DVALUE_H +#ifndef LDC_GEN_DVALUE_H +#define LDC_GEN_DVALUE_H /* These classes are used for generating the IR. They encapsulate D values and @@ -168,4 +168,4 @@ struct DLRValue : DValue virtual DLRValue* isLRValue() { return this; } }; -#endif // LLVMDC_GEN_DVALUE_H +#endif // LDC_GEN_DVALUE_H diff --git a/gen/functions.h b/gen/functions.h index 84d993ec..2e202889 100644 --- a/gen/functions.h +++ b/gen/functions.h @@ -1,5 +1,5 @@ -#ifndef LLVMDC_GEN_FUNCTIONS_H -#define LLVMDC_GEN_FUNCTIONS_H +#ifndef LDC_GEN_FUNCTIONS_H +#define LDC_GEN_FUNCTIONS_H const llvm::FunctionType* DtoFunctionType(Type* t, const LLType* thistype, const LLType* nesttype, bool ismain = false); const llvm::FunctionType* DtoFunctionType(FuncDeclaration* fdecl); diff --git a/gen/irstate.h b/gen/irstate.h index f1ed42c1..f655a1c8 100644 --- a/gen/irstate.h +++ b/gen/irstate.h @@ -1,5 +1,5 @@ -#ifndef LLVMDC_GEN_IRSTATE_H -#define LLVMDC_GEN_IRSTATE_H +#ifndef LDC_GEN_IRSTATE_H +#define LDC_GEN_IRSTATE_H #include #include @@ -234,4 +234,4 @@ CallOrInvoke* IRState::CreateCallOrInvoke(LLValue* Callee, InputIterator ArgBegi return new CallOrInvoke_Call(ir->CreateCall(Callee, ArgBegin, ArgEnd, Name)); } -#endif // LLVMDC_GEN_IRSTATE_H +#endif // LDC_GEN_IRSTATE_H diff --git a/gen/linker.h b/gen/linker.h index 3b1f3573..2e63b4ef 100644 --- a/gen/linker.h +++ b/gen/linker.h @@ -1,5 +1,5 @@ -#ifndef LLVMDC_GEN_LINKER_H -#define LLVMDC_GEN_LINKER_H +#ifndef LDC_GEN_LINKER_H +#define LDC_GEN_LINKER_H #include @@ -33,4 +33,4 @@ void deleteExecutable(); */ int runExectuable(); -#endif // LLVMDC_GEN_LINKER_H +#endif // LDC_GEN_LINKER_H diff --git a/gen/llvmhelpers.h b/gen/llvmhelpers.h index 7a2adbf7..2fba7dd0 100644 --- a/gen/llvmhelpers.h +++ b/gen/llvmhelpers.h @@ -1,5 +1,5 @@ -#ifndef LLVMDC_GEN_LLVMHELPERS_H -#define LLVMDC_GEN_LLVMHELPERS_H +#ifndef LDC_GEN_LLVMHELPERS_H +#define LDC_GEN_LLVMHELPERS_H #include "gen/llvm.h" #include "statement.h" diff --git a/gen/todebug.h b/gen/todebug.h index e4414c36..75dbe932 100644 --- a/gen/todebug.h +++ b/gen/todebug.h @@ -1,5 +1,5 @@ -#ifndef LLVMDC_GEN_TODEBUG_H -#define LLVMDC_GEN_TODEBUG_H +#ifndef LDC_GEN_TODEBUG_H +#define LDC_GEN_TODEBUG_H void RegisterDwarfSymbols(llvm::Module* mod); @@ -37,6 +37,6 @@ void DtoDwarfLocalVariable(LLValue* ll, VarDeclaration* vd); */ LLGlobalVariable* DtoDwarfGlobalVariable(LLGlobalVariable* ll, VarDeclaration* vd); -#endif // LLVMDC_GEN_TODEBUG_H +#endif // LDC_GEN_TODEBUG_H diff --git a/gen/tollvm.h b/gen/tollvm.h index d01fd221..4270e10a 100644 --- a/gen/tollvm.h +++ b/gen/tollvm.h @@ -1,5 +1,5 @@ -#ifndef LLVMDC_GEN_TOLLVM_H -#define LLVMDC_GEN_TOLLVM_H +#ifndef LDC_GEN_TOLLVM_H +#define LDC_GEN_TOLLVM_H #include "gen/llvm.h" #include "lexer.h" @@ -144,4 +144,4 @@ void DtoMemoryBarrier(bool ll, bool ls, bool sl, bool ss, bool device=false); #include "enums.h" -#endif // LLVMDC_GEN_TOLLVM_H +#endif // LDC_GEN_TOLLVM_H diff --git a/gen/typeinf.h b/gen/typeinf.h index b8471ba7..503b58ca 100644 --- a/gen/typeinf.h +++ b/gen/typeinf.h @@ -1,5 +1,5 @@ -#ifndef LLVMDC_GEN_TYPEINF_H -#define LLVMDC_GEN_TYPEINF_H +#ifndef LDC_GEN_TYPEINF_H +#define LDC_GEN_TYPEINF_H void DtoResolveTypeInfo(TypeInfoDeclaration* tid); void DtoDeclareTypeInfo(TypeInfoDeclaration* tid); diff --git a/ir/ir.h b/ir/ir.h index 46b4038a..ed231a68 100644 --- a/ir/ir.h +++ b/ir/ir.h @@ -1,7 +1,7 @@ // this head contains stuff used by all the IR -#ifndef LLVMDC_IR_IR_H -#define LLVMDC_IR_IR_H +#ifndef LDC_IR_IR_H +#define LDC_IR_IR_H #include "ir/irforw.h" #include "root.h" diff --git a/ir/irforw.h b/ir/irforw.h index ca8b3861..747714a1 100644 --- a/ir/irforw.h +++ b/ir/irforw.h @@ -1,5 +1,5 @@ -#ifndef LLVMDC_IR_IRFORW_H -#define LLVMDC_IR_IRFORW_H +#ifndef LDC_IR_IRFORW_H +#define LDC_IR_IRFORW_H // dmd forward declarations struct Module; diff --git a/ir/irfunction.h b/ir/irfunction.h index 7f569163..e611a84d 100644 --- a/ir/irfunction.h +++ b/ir/irfunction.h @@ -1,5 +1,5 @@ -#ifndef LLVMDC_IR_IRFUNCTION_H -#define LLVMDC_IR_IRFUNCTION_H +#ifndef LDC_IR_IRFUNCTION_H +#define LDC_IR_IRFUNCTION_H #include "ir/ir.h" #include "ir/irlandingpad.h" diff --git a/ir/irlandingpad.h b/ir/irlandingpad.h index 5983932f..879f47e8 100644 --- a/ir/irlandingpad.h +++ b/ir/irlandingpad.h @@ -1,5 +1,5 @@ -#ifndef LLVMDC_IR_IRLANDINGPADINFO_H -#define LLVMDC_IR_IRLANDINGPADINFO_H +#ifndef LDC_IR_IRLANDINGPADINFO_H +#define LDC_IR_IRLANDINGPADINFO_H #include "ir/ir.h" #include "statement.h" diff --git a/ir/irmodule.h b/ir/irmodule.h index 739941c4..29fe2b01 100644 --- a/ir/irmodule.h +++ b/ir/irmodule.h @@ -1,5 +1,5 @@ -#ifndef LLVMDC_IR_IRMODULE_H -#define LLVMDC_IR_IRMODULE_H +#ifndef LDC_IR_IRMODULE_H +#define LDC_IR_IRMODULE_H #include "ir/ir.h" diff --git a/ir/irstruct.h b/ir/irstruct.h index ff2d68d6..8d47f4d1 100644 --- a/ir/irstruct.h +++ b/ir/irstruct.h @@ -1,5 +1,5 @@ -#ifndef LLVMDC_IR_IRSTRUCT_H -#define LLVMDC_IR_IRSTRUCT_H +#ifndef LDC_IR_IRSTRUCT_H +#define LDC_IR_IRSTRUCT_H #include "ir/ir.h" diff --git a/ir/irsymbol.h b/ir/irsymbol.h index a3f37b6b..586b4c10 100644 --- a/ir/irsymbol.h +++ b/ir/irsymbol.h @@ -1,5 +1,5 @@ -#ifndef LLVMDC_IR_IRSYMBOL_H -#define LLVMDC_IR_IRSYMBOL_H +#ifndef LDC_IR_IRSYMBOL_H +#define LDC_IR_IRSYMBOL_H #include diff --git a/ir/irtype.h b/ir/irtype.h index c48db020..7b262655 100644 --- a/ir/irtype.h +++ b/ir/irtype.h @@ -1,5 +1,5 @@ -#ifndef LLVMDC_IR_IRTYPE_H -#define LLVMDC_IR_IRTYPE_H +#ifndef LDC_IR_IRTYPE_H +#define LDC_IR_IRTYPE_H #include diff --git a/ir/irvar.h b/ir/irvar.h index 3fbcf3bd..fc13bce2 100644 --- a/ir/irvar.h +++ b/ir/irvar.h @@ -1,5 +1,5 @@ -#ifndef LLVMDC_IR_IRVAR_H -#define LLVMDC_IR_IRVAR_H +#ifndef LDC_IR_IRVAR_H +#define LDC_IR_IRVAR_H #include "ir/ir.h" #include "llvm/Type.h" diff --git a/lphobos/internal/aaA.d b/lphobos/internal/aaA.d index c3d09012..a0b98201 100644 --- a/lphobos/internal/aaA.d +++ b/lphobos/internal/aaA.d @@ -28,7 +28,7 @@ */ /* - * Modified for LLVMDC by Tomas Lindquist Olsen. + * Modified for LDC by Tomas Lindquist Olsen. * The DMD implementation wont quite work due to the differences in how * structs are handled. */ diff --git a/lphobos/internal/objectimpl.d b/lphobos/internal/objectimpl.d index b2d745cf..6efbe19d 100644 --- a/lphobos/internal/objectimpl.d +++ b/lphobos/internal/objectimpl.d @@ -33,7 +33,7 @@ */ /* - * This copy is modified to work with LLVMDC + * This copy is modified to work with LDC * by Tomas Lindquist Olsen, September 2007 */ diff --git a/lphobos/std/format.d b/lphobos/std/format.d index 440dd36f..a0819129 100644 --- a/lphobos/std/format.d +++ b/lphobos/std/format.d @@ -12,7 +12,7 @@ /* * Copyright (C) 2004-2006 by Digital Mars, www.digitalmars.com * Written by Walter Bright - * Modified for LLVMDC by Tomas Lindquist Olsen + * Modified for LDC by Tomas Lindquist Olsen * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/lphobos/std/intrinsic.d b/lphobos/std/intrinsic.d index 102ba447..eba705fb 100644 --- a/lphobos/std/intrinsic.d +++ b/lphobos/std/intrinsic.d @@ -7,7 +7,7 @@ /* NOTE: This file has been patched from the original DMD distribution to work with the GDC compiler. NOTE: This file has been patched from the original GDC distribution to - work with the LLVMDC compiler. + work with the LDC compiler. Modified by David Friedman, May 2006 Modified by Tomas Lindquist Olsen, August 2007 diff --git a/lphobos/std/moduleinit.d b/lphobos/std/moduleinit.d index 9a0bd3e8..d363d29b 100644 --- a/lphobos/std/moduleinit.d +++ b/lphobos/std/moduleinit.d @@ -1,4 +1,4 @@ -// Modified for LLVMDC +// Modified for LDC module std.moduleinit; diff --git a/lphobos/std/stdarg.d b/lphobos/std/stdarg.d index 14071634..c47747ca 100644 --- a/lphobos/std/stdarg.d +++ b/lphobos/std/stdarg.d @@ -6,7 +6,7 @@ /* This is for use with variable argument lists with extern(D) linkage. */ -/* Modified for LLVMDC (LLVM D Compiler) by Tomas Lindquist Olsen, 2007 */ +/* Modified for LDC (LLVM D Compiler) by Tomas Lindquist Olsen, 2007 */ module std.stdarg; diff --git a/lphobos/std/stdint.d b/lphobos/std/stdint.d index d765d007..c05a0c13 100644 --- a/lphobos/std/stdint.d +++ b/lphobos/std/stdint.d @@ -119,7 +119,7 @@ /* NOTE: This file has been patched from the original DMD distribution to - work with the LLVMDC compiler. + work with the LDC compiler. Modified by Tomas Lindquist Olsen, August 2007 */ diff --git a/runtime/internal/aaA.d b/runtime/internal/aaA.d index 7bb71feb..b53dec3e 100644 --- a/runtime/internal/aaA.d +++ b/runtime/internal/aaA.d @@ -29,7 +29,7 @@ /* * Modified by Sean Kelly for use with Tango. - * Modified by Tomas Lindquist Olsen for use with LLVMDC. + * Modified by Tomas Lindquist Olsen for use with LDC. */ private @@ -90,7 +90,7 @@ struct BB * it is completely opaque. */ -// LLVMDC doesn't pass structs in registers so no need to wrap it ... +// LDC doesn't pass structs in registers so no need to wrap it ... alias BB* AA; /********************************** diff --git a/runtime/internal/genobj.d b/runtime/internal/genobj.d index a41e59e9..6228abcd 100644 --- a/runtime/internal/genobj.d +++ b/runtime/internal/genobj.d @@ -33,7 +33,7 @@ /* * Modified by Sean Kelly for use with Tango. - * Modified by Tomas Lindquist Olsen for use with LLVMDC. + * Modified by Tomas Lindquist Olsen for use with LDC. */ module object; diff --git a/runtime/internal/memory.d b/runtime/internal/memory.d index fb634a3c..cf4de47c 100644 --- a/runtime/internal/memory.d +++ b/runtime/internal/memory.d @@ -60,7 +60,7 @@ private import tango.stdc.posix.dlfcn; } } - version(LLVMDC) + version(LDC) { pragma(intrinsic, "llvm.frameaddress") { @@ -122,7 +122,7 @@ extern (C) void* rt_stackBottom() */ extern (C) void* rt_stackTop() { - version(LLVMDC) + version(LDC) { return llvm_frameaddress(); } diff --git a/tests/minicomplex/l.d b/tests/minicomplex/l.d index 5623a866..5a54fddd 100644 --- a/tests/minicomplex/l.d +++ b/tests/minicomplex/l.d @@ -2,5 +2,5 @@ import tango.io.Console; void main() { - Cout("Hi, says LLVMDC + Tango").newline; + Cout("Hi, says LDC + Tango").newline; }