From c66a3762bb27cd782d7aa87ddb512a823e32eb2d Mon Sep 17 00:00:00 2001 From: Iain Buclaw Date: Tue, 23 May 2017 10:34:18 +0200 Subject: [PATCH] Highlight all uses of IN_GCC that have been merged in the frontend. --- src/ddmd/dsymbol.h | 6 +++--- src/ddmd/expression.h | 6 +++--- src/ddmd/globals.d | 2 +- src/ddmd/mtype.d | 4 ++-- src/ddmd/mtype.h | 6 +++--- src/ddmd/statementsem.d | 8 ++++---- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/ddmd/dsymbol.h b/src/ddmd/dsymbol.h index 031355cbdbef..5afd9fd9823a 100644 --- a/src/ddmd/dsymbol.h +++ b/src/ddmd/dsymbol.h @@ -75,11 +75,11 @@ class Expression; class DeleteDeclaration; class OverloadSet; struct AA; -#ifdef IN_GCC +#ifdef IN_GCC // %% typedef union tree_node Symbol; -#else +#else // %% struct Symbol; -#endif +#endif // %% struct Ungag { diff --git a/src/ddmd/expression.h b/src/ddmd/expression.h index 7c8f8d805627..25bf16514555 100644 --- a/src/ddmd/expression.h +++ b/src/ddmd/expression.h @@ -49,11 +49,11 @@ class StringExp; class ArrayExp; class SliceExp; struct UnionExp; -#ifdef IN_GCC +#ifdef IN_GCC // %% typedef union tree_node Symbol; -#else +#else // %% struct Symbol; // back end symbol -#endif +#endif // %% Expression *resolveProperties(Scope *sc, Expression *e); Expression *resolvePropertiesOnly(Scope *sc, Expression *e1); diff --git a/src/ddmd/globals.d b/src/ddmd/globals.d index 25ae2c4dd1aa..a832daa35c63 100644 --- a/src/ddmd/globals.d +++ b/src/ddmd/globals.d @@ -23,7 +23,7 @@ template xversion(string s) enum xversion = mixin(`{ version (` ~ s ~ `) return true; else return false; }`)(); } -enum IN_GCC = xversion!`IN_GCC`; +enum IN_GCC = xversion!`IN_GCC`; // %% enum TARGET_LINUX = xversion!`linux`; enum TARGET_OSX = xversion!`OSX`; diff --git a/src/ddmd/mtype.d b/src/ddmd/mtype.d index edca8afffd8b..66d4906bf161 100644 --- a/src/ddmd/mtype.d +++ b/src/ddmd/mtype.d @@ -2863,11 +2863,11 @@ extern (C++) abstract class Type : RootObject assert(0 < length && length < namelen); // don't overflow the buffer int off = 0; - static if (!IN_GCC) + static if (!IN_GCC) // %% { if (global.params.isOSX || global.params.isWindows && !global.params.is64bit) ++off; // C mangling will add '_' back in - } + } // %% auto id = Identifier.idPool(name + off, length - off); if (name != namebuf.ptr) diff --git a/src/ddmd/mtype.h b/src/ddmd/mtype.h index 391ab60a3db1..47a1c36acc8f 100644 --- a/src/ddmd/mtype.h +++ b/src/ddmd/mtype.h @@ -40,11 +40,11 @@ class TypeBasic; class Parameter; // Back end -#ifdef IN_GCC +#ifdef IN_GCC // %% typedef union tree_node type; -#else +#else // %% typedef struct TYPE type; -#endif +#endif // %% void semanticTypeInfo(Scope *sc, Type *t); MATCH deduceType(RootObject *o, Scope *sc, Type *tparam, TemplateParameters *parameters, Objects *dedtypes, unsigned *wm = NULL, size_t inferStart = 0); diff --git a/src/ddmd/statementsem.d b/src/ddmd/statementsem.d index 50ec23d8a939..c4b097fd4410 100644 --- a/src/ddmd/statementsem.d +++ b/src/ddmd/statementsem.d @@ -3572,7 +3572,7 @@ else override void visit(OnScopeStatement oss) { - static if (!IN_GCC) + static if (!IN_GCC) // %% { if (oss.tok != TOKon_scope_exit) { @@ -3591,7 +3591,7 @@ else return setError(); } } - } + } // %% sc = sc.push(); sc.tf = null; @@ -3855,7 +3855,7 @@ void semantic(Catch c, Scope* sc) { //printf("Catch::semantic(%s)\n", ident.toChars()); - static if (!IN_GCC) + static if (!IN_GCC) // %% { if (sc.os && sc.os.tok != TOKon_scope_failure) { @@ -3874,7 +3874,7 @@ void semantic(Catch c, Scope* sc) error(c.loc, "cannot put catch statement inside finally block"); c.errors = true; } - } + } // %% auto sym = new ScopeDsymbol(); sym.parent = sc.scopesym;