mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-16 12:53:14 +01:00
Align AlignDeclaration constructor signature to upstream version.
If there still are error messages benefiting from the added location information, the change should be upstreamed, as usual.
This commit is contained in:
@@ -722,10 +722,9 @@ void ProtDeclaration::toCBuffer(OutBuffer *buf, HdrGenState *hgs)
|
||||
|
||||
/********************************* AlignDeclaration ****************************/
|
||||
|
||||
AlignDeclaration::AlignDeclaration(Loc loc, unsigned sa, Dsymbols *decl)
|
||||
AlignDeclaration::AlignDeclaration(unsigned sa, Dsymbols *decl)
|
||||
: AttribDeclaration(decl)
|
||||
{
|
||||
this->loc = loc;
|
||||
salign = sa;
|
||||
}
|
||||
|
||||
@@ -734,7 +733,7 @@ Dsymbol *AlignDeclaration::syntaxCopy(Dsymbol *s)
|
||||
AlignDeclaration *ad;
|
||||
|
||||
assert(!s);
|
||||
ad = new AlignDeclaration(loc, salign, Dsymbol::arraySyntaxCopy(decl));
|
||||
ad = new AlignDeclaration(salign, Dsymbol::arraySyntaxCopy(decl));
|
||||
return ad;
|
||||
}
|
||||
|
||||
@@ -754,8 +753,6 @@ void AlignDeclaration::semantic(Scope *sc)
|
||||
{
|
||||
semanticNewSc(sc, sc->stc, sc->linkage, sc->protection, sc->explicitProtection, salign);
|
||||
}
|
||||
else
|
||||
assert(0 && "what kind of align use triggers this?");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ struct AlignDeclaration : AttribDeclaration
|
||||
{
|
||||
unsigned salign;
|
||||
|
||||
AlignDeclaration(Loc loc, unsigned sa, Dsymbols *decl);
|
||||
AlignDeclaration(unsigned sa, Dsymbols *decl);
|
||||
Dsymbol *syntaxCopy(Dsymbol *s);
|
||||
void setScope(Scope *sc);
|
||||
void semantic(Scope *sc);
|
||||
|
||||
@@ -507,9 +507,6 @@ Dsymbols *Parser::parseDeclDefs(int once)
|
||||
case TOKalign:
|
||||
{ unsigned n;
|
||||
|
||||
// LDC better align code locations
|
||||
Loc alignloc = loc;
|
||||
|
||||
s = NULL;
|
||||
nextToken();
|
||||
if (token.value == TOKlparen)
|
||||
@@ -532,7 +529,7 @@ Dsymbols *Parser::parseDeclDefs(int once)
|
||||
n = global.structalign; // default
|
||||
|
||||
a = parseBlock();
|
||||
s = new AlignDeclaration(alignloc, n, a);
|
||||
s = new AlignDeclaration(n, a);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user