mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-04 00:55:49 +03:00
Merge branch 'master' into merge-2.067
This commit is contained in:
commit
21d1bab114
6 changed files with 138 additions and 22 deletions
|
@ -943,7 +943,11 @@ void DtoResolveVariable(VarDeclaration* vd)
|
|||
Logger::println("parent: null");
|
||||
}
|
||||
|
||||
const bool isLLConst = (vd->isConst() || vd->isImmutable()) && vd->init;
|
||||
// If a const/immutable value has a proper initializer (not "= void"),
|
||||
// it cannot be assigned again in a static constructor. Thus, we can
|
||||
// emit it as read-only data.
|
||||
const bool isLLConst = (vd->isConst() || vd->isImmutable()) &&
|
||||
vd->init && !vd->init->isVoidInitializer();
|
||||
|
||||
assert(!vd->ir.isInitialized());
|
||||
if (gIR->dmodule)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue