diff options
author | Iain Buclaw <ibuclaw@gdcproject.org> | 2022-03-11 23:19:14 +0100 |
---|---|---|
committer | Iain Buclaw <ibuclaw@gdcproject.org> | 2022-03-11 23:34:59 +0100 |
commit | 42d9ff3ac845478b7fca20f04ce392204a2d3af9 (patch) | |
tree | 1ac9324cf30c4fad77cb8e77ebb78bf5afcfa6ad /gcc/cp/constexpr.cc | |
parent | 7a6ba7c7cb6ff5ac9bbcc747bd5fad957b78fa0a (diff) | |
download | gcc-42d9ff3ac845478b7fca20f04ce392204a2d3af9.zip gcc-42d9ff3ac845478b7fca20f04ce392204a2d3af9.tar.gz gcc-42d9ff3ac845478b7fca20f04ce392204a2d3af9.tar.bz2 |
d: Cache generated import declarations in a hash_map
Originally, these were cached in the front-end AST node field `isym'.
However, this field is due to be removed in the future.
gcc/d/ChangeLog:
* imports.cc (imported_decls): Define.
(class ImportVisitor): Add result_ field.
(ImportVisitor::result): New method.
(ImportVisitor::visit (Module *)): Store decl to result_.
(ImportVisitor::visit (Import *)): Likewise.
(ImportVisitor::visit (AliasDeclaration *)): Don't cache decl in
front-end AST node.
(ImportVisitor::visit (OverDeclaration *)): Likewise.
(ImportVisitor::visit (FuncDeclaration *)): Likewise.
(ImportVisitor::visit (Declaration *)): Likewise.
(build_import_decl): Use imported_decls to cache and lookup built
declarations.
Diffstat (limited to 'gcc/cp/constexpr.cc')
0 files changed, 0 insertions, 0 deletions