mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-01 15:40:55 +03:00
Const and immutable fields with initializers are not globals since 2.064
This commit is contained in:
parent
960d84508b
commit
e526d74ed5
2 changed files with 4 additions and 8 deletions
|
@ -227,14 +227,12 @@ public:
|
|||
}
|
||||
|
||||
// global variable
|
||||
if (decl->isDataseg() || (decl->storage_class & (STCconst | STCimmutable) && decl->init))
|
||||
if (decl->isDataseg())
|
||||
{
|
||||
Logger::println("data segment");
|
||||
|
||||
#if 0 // TODO:
|
||||
assert(!(decl->storage_class & STCmanifest) &&
|
||||
"manifest constant being codegen'd!");
|
||||
#endif
|
||||
|
||||
IrGlobal *irGlobal = getIrGlobal(decl);
|
||||
llvm::GlobalVariable *gvar = llvm::cast<llvm::GlobalVariable>(irGlobal->value);
|
||||
|
|
|
@ -1018,14 +1018,12 @@ void DtoResolveVariable(VarDeclaration* vd)
|
|||
DtoResolveDsymbol(ad);
|
||||
|
||||
// global variable
|
||||
if (vd->isDataseg() || (vd->storage_class & (STCconst | STCimmutable) && vd->init))
|
||||
if (vd->isDataseg())
|
||||
{
|
||||
Logger::println("data segment");
|
||||
|
||||
#if 0 // TODO:
|
||||
assert(!(storage_class & STCmanifest) &&
|
||||
assert(!(vd->storage_class & STCmanifest) &&
|
||||
"manifest constant being codegen'd!");
|
||||
#endif
|
||||
|
||||
// don't duplicate work
|
||||
if (vd->ir.isResolved()) return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue