diff options
Diffstat (limited to 'gcc/d/dmd/clone.d')
-rw-r--r-- | gcc/d/dmd/clone.d | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/gcc/d/dmd/clone.d b/gcc/d/dmd/clone.d index c999048..c030d35 100644 --- a/gcc/d/dmd/clone.d +++ b/gcc/d/dmd/clone.d @@ -870,17 +870,17 @@ void buildDtors(AggregateDeclaration ad, Scope* sc) return; // unions don't have destructors StorageClass stc = STC.safe | STC.nothrow_ | STC.pure_ | STC.nogc; - Loc declLoc = ad.userDtors.dim ? ad.userDtors[0].loc : ad.loc; + Loc declLoc = ad.userDtors.length ? ad.userDtors[0].loc : ad.loc; Loc loc; // internal code should have no loc to prevent coverage FuncDeclaration xdtor_fwd = null; // Build the field destructor (`ad.fieldDtor`), if needed. // If the user dtor is an extern(C++) prototype, then we expect it performs a full-destruction and skip building. - const bool dtorIsCppPrototype = ad.userDtors.dim && ad.userDtors[0]._linkage == LINK.cpp && !ad.userDtors[0].fbody; + const bool dtorIsCppPrototype = ad.userDtors.length && ad.userDtors[0]._linkage == LINK.cpp && !ad.userDtors[0].fbody; if (!dtorIsCppPrototype) { Expression e = null; - for (size_t i = 0; i < ad.fields.dim; i++) + for (size_t i = 0; i < ad.fields.length; i++) { auto v = ad.fields[i]; if (v.storage_class & STC.ref_) @@ -985,7 +985,7 @@ void buildDtors(AggregateDeclaration ad, Scope* sc) } // Set/build `ad.aggrDtor` - switch (dtors.dim) + switch (dtors.length) { case 0: break; @@ -1168,7 +1168,7 @@ private DtorDeclaration buildExternDDtor(AggregateDeclaration ad, Scope* sc) */ FuncDeclaration buildInv(AggregateDeclaration ad, Scope* sc) { - switch (ad.invs.dim) + switch (ad.invs.length) { case 0: return null; @@ -1225,11 +1225,11 @@ FuncDeclaration buildPostBlit(StructDeclaration sd, Scope* sc) if (sd.isUnionDeclaration()) return null; - const hasUserDefinedPosblit = sd.postblits.dim && !sd.postblits[0].isDisabled ? true : false; + const hasUserDefinedPosblit = sd.postblits.length && !sd.postblits[0].isDisabled ? true : false; // by default, the storage class of the created postblit StorageClass stc = STC.safe | STC.nothrow_ | STC.pure_ | STC.nogc; - Loc declLoc = sd.postblits.dim ? sd.postblits[0].loc : sd.loc; + Loc declLoc = sd.postblits.length ? sd.postblits[0].loc : sd.loc; Loc loc; // internal code should have no loc to prevent coverage // if any of the postblits are disabled, then the generated postblit @@ -1240,7 +1240,7 @@ FuncDeclaration buildPostBlit(StructDeclaration sd, Scope* sc) VarDeclaration[] fieldsToDestroy; auto postblitCalls = new Statements(); // iterate through all the struct fields that are not disabled - for (size_t i = 0; i < sd.fields.dim && !(stc & STC.disable); i++) + for (size_t i = 0; i < sd.fields.length && !(stc & STC.disable); i++) { auto structField = sd.fields[i]; if (structField.storage_class & STC.ref_) @@ -1411,7 +1411,7 @@ FuncDeclaration buildPostBlit(StructDeclaration sd, Scope* sc) } // Build our own "postblit" which executes a, but only if needed. - if (postblitCalls.dim || (stc & STC.disable)) + if (postblitCalls.length || (stc & STC.disable)) { //printf("Building __fieldPostBlit()\n"); checkShared(); @@ -1426,7 +1426,7 @@ FuncDeclaration buildPostBlit(StructDeclaration sd, Scope* sc) // create __xpostblit, which is the generated postblit FuncDeclaration xpostblit = null; - switch (sd.postblits.dim) + switch (sd.postblits.length) { case 0: break; |