diff options
Diffstat (limited to 'gcc/cp/module.cc')
-rw-r--r-- | gcc/cp/module.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gcc/cp/module.cc b/gcc/cp/module.cc index ce0ba69..7c42aea 100644 --- a/gcc/cp/module.cc +++ b/gcc/cp/module.cc @@ -11790,10 +11790,9 @@ has_definition (tree decl) if (DECL_DECLARED_INLINE_P (decl)) return true; - if (DECL_THIS_STATIC (decl) - && (header_module_p () - || (!DECL_LANG_SPECIFIC (decl) || !DECL_MODULE_PURVIEW_P (decl)))) - /* GM static function. */ + if (header_module_p ()) + /* We always need to write definitions in header modules, + since there's no TU to emit them in otherwise. */ return true; if (DECL_TEMPLATE_INFO (decl)) @@ -11826,11 +11825,12 @@ has_definition (tree decl) else { if (!DECL_INITIALIZED_P (decl)) + /* Not defined. */ return false; - if (header_module_p () - || (!DECL_LANG_SPECIFIC (decl) || !DECL_MODULE_PURVIEW_P (decl))) - /* GM static variable. */ + if (header_module_p ()) + /* We always need to write definitions in header modules, + since there's no TU to emit them in otherwise. */ return true; if (!TREE_CONSTANT (decl)) |