aboutsummaryrefslogtreecommitdiff
path: root/gcc/d/dmd/arrayop.c
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gdcproject.org>2021-01-07 18:03:33 +0100
committerIain Buclaw <ibuclaw@gdcproject.org>2021-01-07 18:22:36 +0100
commitdddea6d4d81cac76ff64cde178e2d5f7fe09fb55 (patch)
treef8c2345d5a980c6523798c1388a777e05fdaf500 /gcc/d/dmd/arrayop.c
parentd54029179cbe817eaf9b6899339b0151cff3c00e (diff)
downloadgcc-dddea6d4d81cac76ff64cde178e2d5f7fe09fb55.zip
gcc-dddea6d4d81cac76ff64cde178e2d5f7fe09fb55.tar.gz
gcc-dddea6d4d81cac76ff64cde178e2d5f7fe09fb55.tar.bz2
d: Merge upstream dmd 9038e64c5.
Adds support for using user-defined attributes on function arguments and single-parameter alias declarations. These attributes behave analogous to existing UDAs. gcc/d/ChangeLog: * dmd/MERGE: Merge upstream dmd 9038e64c5. * d-builtins.cc (build_frontend_type): Update call to Parameter::create.
Diffstat (limited to 'gcc/d/dmd/arrayop.c')
-rw-r--r--gcc/d/dmd/arrayop.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/d/dmd/arrayop.c b/gcc/d/dmd/arrayop.c
index 72abd5e..20cdb6f 100644
--- a/gcc/d/dmd/arrayop.c
+++ b/gcc/d/dmd/arrayop.c
@@ -51,7 +51,7 @@ FuncDeclaration *buildArrayOp(Identifier *ident, BinExp *exp, Scope *sc)
Parameter *p = (*fparams)[0];
// foreach (i; 0 .. p.length)
Statement *s1 = new ForeachRangeStatement(Loc(), TOKforeach,
- new Parameter(0, NULL, Id::p, NULL),
+ new Parameter(0, NULL, Id::p, NULL, NULL),
new IntegerExp(Loc(), 0, Type::tsize_t),
new ArrayLengthExp(Loc(), new IdentifierExp(Loc(), p->ident)),
new ExpStatement(Loc(), loopbody),
@@ -422,7 +422,7 @@ Expression *buildArrayLoop(Expression *e, Parameters *fparams)
void visit(Expression *e)
{
Identifier *id = Identifier::generateId("c", fparams->length);
- Parameter *param = new Parameter(0, e->type, id, NULL);
+ Parameter *param = new Parameter(0, e->type, id, NULL, NULL);
fparams->shift(param);
result = new IdentifierExp(Loc(), id);
}
@@ -441,7 +441,7 @@ Expression *buildArrayLoop(Expression *e, Parameters *fparams)
void visit(ArrayLiteralExp *e)
{
Identifier *id = Identifier::generateId("p", fparams->length);
- Parameter *param = new Parameter(STCconst, e->type, id, NULL);
+ Parameter *param = new Parameter(STCconst, e->type, id, NULL, NULL);
fparams->shift(param);
Expression *ie = new IdentifierExp(Loc(), id);
Expression *index = new IdentifierExp(Loc(), Id::p);
@@ -451,7 +451,7 @@ Expression *buildArrayLoop(Expression *e, Parameters *fparams)
void visit(SliceExp *e)
{
Identifier *id = Identifier::generateId("p", fparams->length);
- Parameter *param = new Parameter(STCconst, e->type, id, NULL);
+ Parameter *param = new Parameter(STCconst, e->type, id, NULL, NULL);
fparams->shift(param);
Expression *ie = new IdentifierExp(Loc(), id);
Expression *index = new IdentifierExp(Loc(), Id::p);