Skip to content
This repository was archived by the owner on Jun 20, 2019. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gcc.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
gcc-9-20180729
gcc-9-20180826
14 changes: 14 additions & 0 deletions gcc/d/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
2018-08-29 Iain Buclaw <ibuclaw@gdcproject.org>

* d-target.cc (Target::prefixName): Remove function.
(Target::cppParameterType): New function.

2018-08-25 Iain Buclaw <ibuclaw@gdcproject.org>

* Make-lang.in (D_FRONTEND_OBJS): Add iasm.o, iasmgcc.o
* lang.opt (fproperty): Remove option.
* d-lang.cc (d_handle_option): Remove case for OPT_fproperty.
* toir.cc (IRVisitor::visit(ExtAsmStatement)): Rename override to
GccAsmStatement.

2018-07-23 Eugene Wissner <belka@caraus.de>

* d-lang.cc (d_handle_option): Change function argument to HOST_WIDE_INT.
* lang.opt (Walloca-larger-than=, Wno-alloca-larger-than): New options.
* opt.texi (Walloca-larger-than=, Wno-alloca-larger-than): Likewise.
Expand Down
2 changes: 2 additions & 0 deletions gcc/d/Make-lang.in
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ D_FRONTEND_OBJS = \
d/filename.o \
d/func.o \
d/hdrgen.o \
d/iasm.o \
d/iasmgcc.o \
d/identifier.o \
d/imphint.o \
d/init.o \
Expand Down
4 changes: 4 additions & 0 deletions gcc/d/d-builtins.cc
Original file line number Diff line number Diff line change
Expand Up @@ -430,12 +430,16 @@ d_init_versions (void)
VersionCondition::addPredefinedGlobalIdent ("D_Coverage");
if (flag_pic)
VersionCondition::addPredefinedGlobalIdent ("D_PIC");

if (global.params.doDocComments)
VersionCondition::addPredefinedGlobalIdent ("D_Ddoc");

if (global.params.useUnitTests)
VersionCondition::addPredefinedGlobalIdent ("unittest");

if (global.params.useAssert)
VersionCondition::addPredefinedGlobalIdent ("assert");

if (global.params.useArrayBounds == BOUNDSCHECKoff)
VersionCondition::addPredefinedGlobalIdent ("D_NoBoundsChecks");

Expand Down
9 changes: 0 additions & 9 deletions gcc/d/d-frontend.cc
Original file line number Diff line number Diff line change
Expand Up @@ -428,15 +428,6 @@ CTFloat::hash (real_t r)

/* Implements backend-specific interfaces used by the frontend. */

/* Semantically analyze AsmStatement where SC is the scope. */

Statement *
asmSemantic (AsmStatement *s, Scope *sc)
{
sc->func->hasReturnExp |= 8;
return s;
}

/* Determine return style of function - whether in registers or through a
hidden pointer to the caller's stack. */

Expand Down
4 changes: 0 additions & 4 deletions gcc/d/d-lang.cc
Original file line number Diff line number Diff line change
Expand Up @@ -514,10 +514,6 @@ d_handle_option (size_t scode, const char *arg, HOST_WIDE_INT value,
global.params.useIn = value;
break;

case OPT_fproperty:
global.params.enforcePropertySyntax = value;
break;

case OPT_frelease:
global.params.release = value;
break;
Expand Down
38 changes: 31 additions & 7 deletions gcc/d/d-target.cc
Original file line number Diff line number Diff line change
Expand Up @@ -431,13 +431,6 @@ Target::isVectorOpSupported (Type *type, TOK op, Type *)
return true;
}

/* Apply any target-specific prefixes based on the given linkage. */

void
Target::prefixName (OutBuffer *, LINK)
{
}

/* Return the symbol mangling of S for C++ linkage. */

const char *
Expand Down Expand Up @@ -469,6 +462,37 @@ Target::cppTypeMangle (Type *type)
return NULL;
}

/* Return the type that will really be used for passing the given parameter
ARG to an extern(C++) function. */

Type *
Target::cppParameterType (Parameter *arg)
{
Type *t = arg->type->merge2 ();
if (arg->storageClass & (STCout | STCref))
t = t->referenceTo ();
else if (arg->storageClass & STClazy)
{
/* Mangle as delegate. */
Type *td = TypeFunction::create (NULL, t, 0, LINKd);
td = TypeDelegate::create (td);
t = t->merge2 ();
}

/* Could be a va_list, which we mangle as a pointer. */
if (t->ty == Tsarray && Type::tvalist->ty == Tsarray)
{
Type *tb = t->toBasetype ()->mutableOf ();
if (tb == Type::tvalist)
{
tb = t->nextOf ()->pointerTo ();
t = tb->castMod (t->mod);
}
}

return t;
}

/* Return the default system linkage for the target. */

LINK
Expand Down
Loading