Skip to content

Commit

Permalink
Highlight all uses of IN_GCC that have been merged in the frontend.
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuclaw committed Sep 27, 2017
1 parent 962f60a commit c66a376
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
6 changes: 3 additions & 3 deletions src/ddmd/dsymbol.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
6 changes: 3 additions & 3 deletions src/ddmd/expression.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/ddmd/globals.d
Original file line number Diff line number Diff line change
Expand Up @@ -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`;
Expand Down
4 changes: 2 additions & 2 deletions src/ddmd/mtype.d
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions src/ddmd/mtype.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 4 additions & 4 deletions src/ddmd/statementsem.d
Original file line number Diff line number Diff line change
Expand Up @@ -3572,7 +3572,7 @@ else

override void visit(OnScopeStatement oss)
{
static if (!IN_GCC)
static if (!IN_GCC) // %%
{
if (oss.tok != TOKon_scope_exit)
{
Expand All @@ -3591,7 +3591,7 @@ else
return setError();
}
}
}
} // %%

sc = sc.push();
sc.tf = null;
Expand Down Expand Up @@ -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)
{
Expand All @@ -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;
Expand Down

0 comments on commit c66a376

Please sign in to comment.