From 44b6ba5cda766917a817cbb9a917947f580852d5 Mon Sep 17 00:00:00 2001 From: Walter Bright Date: Mon, 14 Nov 2011 19:12:57 -0800 Subject: [PATCH] get rid of _DH --- src/declaration.c | 10 ---------- src/enum.h | 2 -- src/expression.h | 2 -- src/func.c | 5 ----- src/iasm.c | 4 ---- src/identifier.h | 2 -- src/import.h | 2 -- src/statement.h | 2 -- src/staticassert.h | 2 -- src/win32.mak | 4 ++-- 10 files changed, 2 insertions(+), 33 deletions(-) diff --git a/src/declaration.c b/src/declaration.c index d111f0c8bfaa..bf464d4fa9d2 100644 --- a/src/declaration.c +++ b/src/declaration.c @@ -399,10 +399,8 @@ AliasDeclaration::AliasDeclaration(Loc loc, Identifier *id, Type *type) this->loc = loc; this->type = type; this->aliassym = NULL; -#ifdef _DH this->htype = NULL; this->haliassym = NULL; -#endif this->overnext = NULL; this->inSemantic = 0; assert(type); @@ -416,10 +414,8 @@ AliasDeclaration::AliasDeclaration(Loc loc, Identifier *id, Dsymbol *s) this->loc = loc; this->type = NULL; this->aliassym = s; -#ifdef _DH this->htype = NULL; this->haliassym = NULL; -#endif this->overnext = NULL; this->inSemantic = 0; assert(s); @@ -434,7 +430,6 @@ Dsymbol *AliasDeclaration::syntaxCopy(Dsymbol *s) sa = new AliasDeclaration(loc, ident, type->syntaxCopy()); else sa = new AliasDeclaration(loc, ident, aliassym->syntaxCopy(NULL)); -#ifdef _DH // Syntax copy for header file if (!htype) // Don't overwrite original { if (type) // Make copy for both old and new instances @@ -452,7 +447,6 @@ Dsymbol *AliasDeclaration::syntaxCopy(Dsymbol *s) } else sa->haliassym = haliassym->syntaxCopy(s); -#endif return sa; } @@ -710,10 +704,8 @@ VarDeclaration::VarDeclaration(Loc loc, Type *type, Identifier *id, Initializer assert(type || init); this->type = type; this->init = init; -#ifdef _DH this->htype = NULL; this->hinit = NULL; -#endif this->loc = loc; offset = 0; noscope = 0; @@ -750,7 +742,6 @@ Dsymbol *VarDeclaration::syntaxCopy(Dsymbol *s) sv = new VarDeclaration(loc, type ? type->syntaxCopy() : NULL, ident, init); sv->storage_class = storage_class; } -#ifdef _DH // Syntax copy for header file if (!htype) // Don't overwrite original { if (type) // Make copy for both old and new instances @@ -768,7 +759,6 @@ Dsymbol *VarDeclaration::syntaxCopy(Dsymbol *s) } else sv->hinit = hinit->syntaxCopy(); -#endif return sv; } diff --git a/src/enum.h b/src/enum.h index d4fc8c9fe2b3..ead6fab963e6 100644 --- a/src/enum.h +++ b/src/enum.h @@ -21,9 +21,7 @@ struct Identifier; struct Type; struct Expression; -#ifdef _DH struct HdrGenState; -#endif struct EnumDeclaration : ScopeDsymbol diff --git a/src/expression.h b/src/expression.h index 82f3d0970ee3..519234e56f89 100644 --- a/src/expression.h +++ b/src/expression.h @@ -254,9 +254,7 @@ struct ComplexExp : Expression int isBool(int result); void toCBuffer(OutBuffer *buf, HdrGenState *hgs); void toMangleBuffer(OutBuffer *buf); -#ifdef _DH OutBuffer hexp; -#endif elem *toElem(IRState *irs); dt_t **toDt(dt_t **pdt); }; diff --git a/src/func.c b/src/func.c index 97ff1dd5384e..8df39529ace4 100644 --- a/src/func.c +++ b/src/func.c @@ -1326,15 +1326,10 @@ void FuncDeclaration::semantic3(Scope *sc) // Merge contracts together with body into one compound statement -#ifdef _DH if (frequire && global.params.useIn) { frequire->incontract = 1; a->push(frequire); } -#else - if (frequire && global.params.useIn) - a->push(frequire); -#endif // Precondition invariant if (addPreInvariant()) diff --git a/src/iasm.c b/src/iasm.c index 9b3409d586ef..d25b014e861a 100644 --- a/src/iasm.c +++ b/src/iasm.c @@ -52,10 +52,6 @@ #include "code.h" #include "iasm.h" -#if DMDV1 -#undef _DH -#endif - // I32 isn't set correctly yet because this is the front end, and I32 // is a backend flag #undef I16 diff --git a/src/identifier.h b/src/identifier.h index c397f23b8d6e..b786fca96deb 100644 --- a/src/identifier.h +++ b/src/identifier.h @@ -29,9 +29,7 @@ struct Identifier : Object int compare(Object *o); void print(); char *toChars(); -#ifdef _DH char *toHChars(); -#endif const char *toHChars2(); int dyncast(); diff --git a/src/import.h b/src/import.h index 5bb7106f6da6..0c20457ed292 100644 --- a/src/import.h +++ b/src/import.h @@ -24,9 +24,7 @@ struct OutBuffer; struct Module; struct Package; struct AliasDeclaration; -#ifdef _DH struct HdrGenState; -#endif struct Import : Dsymbol { diff --git a/src/statement.h b/src/statement.h index 288a7221060b..064eb98b7d56 100644 --- a/src/statement.h +++ b/src/statement.h @@ -96,9 +96,7 @@ struct Statement : Object virtual TryCatchStatement *isTryCatchStatement() { return NULL; } virtual GotoStatement *isGotoStatement() { return NULL; } virtual AsmStatement *isAsmStatement() { return NULL; } -#ifdef _DH int incontract; -#endif virtual ScopeStatement *isScopeStatement() { return NULL; } virtual Statement *semantic(Scope *sc); Statement *semanticScope(Scope *sc, Statement *sbreak, Statement *scontinue); diff --git a/src/staticassert.h b/src/staticassert.h index 632c1e901725..2f7e0906e7dd 100644 --- a/src/staticassert.h +++ b/src/staticassert.h @@ -18,9 +18,7 @@ #include "dsymbol.h" struct Expression; -#ifdef _DH struct HdrGenState; -#endif struct StaticAssert : Dsymbol { diff --git a/src/win32.mak b/src/win32.mak index db4f29a7e618..024dca4b74cf 100644 --- a/src/win32.mak +++ b/src/win32.mak @@ -36,8 +36,8 @@ LFLAGS= LINKN=$(SCROOT)\bin\link /de -CFLAGS=-I$(ROOT);$(INCLUDE) $(XFLG) $(OPT) $(DEBUG) -cpp -D_DH -MFLAGS=-I$C;$(TK) $(OPT) -DMARS -cpp $(DEBUG) -e -wx -D_DH +CFLAGS=-I$(ROOT);$(INCLUDE) $(XFLG) $(OPT) $(DEBUG) -cpp +MFLAGS=-I$C;$(TK) $(OPT) -DMARS -cpp $(DEBUG) -e -wx # Makerules: .c.obj: