A variable with a preinit block requires an intialization function.
From-SVN: r168198
This commit is contained in:
parent
9d65de2123
commit
1e9402cb3d
1 changed files with 5 additions and 1 deletions
|
@ -1384,7 +1384,11 @@ Gogo::determine_types()
|
|||
|
||||
// If this is a global variable which requires runtime
|
||||
// initialization, we need an initialization function.
|
||||
if (!variable->is_global() || variable->init() == NULL)
|
||||
if (!variable->is_global())
|
||||
;
|
||||
else if (variable->has_pre_init())
|
||||
this->need_init_fn_ = true;
|
||||
else if (variable->init() == NULL)
|
||||
;
|
||||
else if (variable->type()->interface_type() != NULL)
|
||||
this->need_init_fn_ = true;
|
||||
|
|
Loading…
Add table
Reference in a new issue