diff options
author | Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com> | 2024-04-25 16:34:44 +0200 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2025-03-17 16:35:24 +0100 |
commit | 520a61b1dc7fdc072c825a687749316ed698f926 (patch) | |
tree | 292833323c496cfde8ec1e7edde750d8fb799e0a /gcc/diagnostic-buffer.h | |
parent | 8c5be0dd1c460694a2c8ef78bdadc2c6aea01ad8 (diff) | |
download | gcc-520a61b1dc7fdc072c825a687749316ed698f926.zip gcc-520a61b1dc7fdc072c825a687749316ed698f926.tar.gz gcc-520a61b1dc7fdc072c825a687749316ed698f926.tar.bz2 |
gccrs: Change crate name retrieval function return types
Change their return type to a const reference in order to avoid copies
when possible. Also wrap this new return type into an optional.
gcc/rust/ChangeLog:
* checks/errors/borrowck/rust-borrow-checker.cc (BorrowChecker::go):
Adapt the code to the new return types.
* resolve/rust-ast-resolve.cc (NameResolution::go): Likewise.
* util/rust-hir-map.cc (Mappings::get_crate_name): Change return type
to const string reference optional.
(Mappings::get_current_crate_name): Likewise.
* util/rust-hir-map.h: Update function prototypes.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Diffstat (limited to 'gcc/diagnostic-buffer.h')
0 files changed, 0 insertions, 0 deletions