aboutsummaryrefslogtreecommitdiff
path: root/gcc/diagnostic-buffer.h
diff options
context:
space:
mode:
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>2024-04-25 16:34:44 +0200
committerArthur Cohen <arthur.cohen@embecosm.com>2025-03-17 16:35:24 +0100
commit520a61b1dc7fdc072c825a687749316ed698f926 (patch)
tree292833323c496cfde8ec1e7edde750d8fb799e0a /gcc/diagnostic-buffer.h
parent8c5be0dd1c460694a2c8ef78bdadc2c6aea01ad8 (diff)
downloadgcc-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