diff options
Diffstat (limited to 'gcc')
| -rw-r--r-- | gcc/gcc/elna-builtins.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/gcc/elna-builtins.cc b/gcc/gcc/elna-builtins.cc index 69b8229..a364ce6 100644 --- a/gcc/gcc/elna-builtins.cc +++ b/gcc/gcc/elna-builtins.cc @@ -431,6 +431,14 @@ namespace elna::gcc } } + static void declare_constant(const std::string& name, + const boot::constant_info& info, const std::shared_ptr<symbol_table>& symbols) + { + tree type = get_inner_alias(info.symbol, symbols); + tree constant_tree = constant_to_tree(info.value, symbols, type); + symbols->enter(name, constant_tree); + } + void rewrite_symbol_table(const std::shared_ptr<boot::symbol_table>& info_table, const std::shared_ptr<symbol_table>& symbols, const bool imported) { @@ -458,6 +466,10 @@ namespace elna::gcc { declare_procedure(symbol_name, *procedure_info, symbols); } + else if (const auto constant_info = symbol_info->is_constant()) + { + declare_constant(symbol_name, *constant_info, symbols); + } } } } |
