]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: Change return type of lookup_hir_extern_block
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Thu, 25 Apr 2024 13:14:36 +0000 (15:14 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Mon, 17 Mar 2025 15:35:23 +0000 (16:35 +0100)
commit7146c1b6f5edfd7d0b92685d81c81fa1ec40ceab
tree59e133719893ce9990cca652cc3afdc28bb8ac81
parent7b90f5e5212b056dfac763b6a4e79b533dbe4f2b
gccrs: Change return type of lookup_hir_extern_block

Change the return type to an optional in order to easily differentiate
between a null pointer and an missing value.

gcc/rust/ChangeLog:

* checks/errors/rust-unsafe-checker.cc (UnsafeChecker::check_function_call):
Adapt function call to new return type.
* typecheck/rust-type-util.cc (query_type): Likewise.
* util/rust-hir-map.cc (Mappings::insert_hir_extern_block): Likewise.
(Mappings::lookup_hir_extern_block): Change return type to an optional.
* util/rust-hir-map.h: Update the function's prototype.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
gcc/rust/checks/errors/rust-unsafe-checker.cc
gcc/rust/typecheck/rust-type-util.cc
gcc/rust/util/rust-hir-map.cc
gcc/rust/util/rust-hir-map.h