diff options
author | Marc Poulhiès <dkm@kataplop.net> | 2023-06-30 00:44:52 +0200 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2024-01-16 18:49:30 +0100 |
commit | 11fbade585049d2ff2f51f66a1eb6106deaec619 (patch) | |
tree | 3bfd72fcf0ddd8976f381bfffd39e3ff54affbc3 /gcc/rust/backend | |
parent | 0ee496d5dc105b1925af0366d72c91c4e5712b3c (diff) | |
download | gcc-11fbade585049d2ff2f51f66a1eb6106deaec619.zip gcc-11fbade585049d2ff2f51f66a1eb6106deaec619.tar.gz gcc-11fbade585049d2ff2f51f66a1eb6106deaec619.tar.bz2 |
gccrs: refactor: make crate.items private
Introduce Crate::get_items () and fixup all callers.
gcc/rust/ChangeLog:
* hir/tree/rust-hir.h (struct Crate): Rename struct into ...
(class Crate): ... class, and add get_items.
* backend/rust-compile.cc (CompileCrate::go): Adapt to visibility change of items.
* checks/errors/privacy/rust-privacy-check.cc (Resolver::resolve): Likewise.
* checks/errors/privacy/rust-privacy-reporter.cc (PrivacyReporter::go): Likewise.
* checks/errors/privacy/rust-pub-restricted-visitor.cc (PubRestrictedVisitor::go): Likewise.
* checks/errors/privacy/rust-visibility-resolver.cc (VisibilityResolver::go): Likewise.
* checks/errors/rust-const-checker.cc (ConstChecker::go): Likewise.
* checks/errors/rust-unsafe-checker.cc (UnsafeChecker::go): Likewise.
* checks/lints/rust-lint-marklive.cc (FindEntryPoint::find): Likewise.
* checks/lints/rust-lint-scan-deadcode.h (ScanDeadCode::Scan): Likewise.
* metadata/rust-export-metadata.cc (PublicInterface::gather_export_data): Likewise.
* typecheck/rust-hir-type-check.cc (TypeResolution::Resolve): Likewise.
* hir/rust-hir-dump.cc (CompileCrate::go): Likewise.
Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
Diffstat (limited to 'gcc/rust/backend')
-rw-r--r-- | gcc/rust/backend/rust-compile.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/rust/backend/rust-compile.cc b/gcc/rust/backend/rust-compile.cc index b7d0741..6867737 100644 --- a/gcc/rust/backend/rust-compile.cc +++ b/gcc/rust/backend/rust-compile.cc @@ -43,7 +43,7 @@ CompileCrate::Compile (HIR::Crate &crate, Context *ctx) void CompileCrate::go () { - for (auto &item : crate.items) + for (auto &item : crate.get_items ()) CompileItem::compile (item.get (), ctx); } |