]> git.ipfire.org Git - thirdparty/gcc.git/commit
Change lookup_hir_expr return type to optional
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Fri, 3 May 2024 17:40:18 +0000 (19:40 +0200)
committerP-E-P <32375388+P-E-P@users.noreply.github.com>
Fri, 17 May 2024 15:28:30 +0000 (15:28 +0000)
commit478c227c864f108a49ffa9bc695c0413e159c15c
treeb0907cd8f9ad70bfe4c1ea46076788a5a5aa4035
parent1fcb7198e46212a1689e190aca0e4803d9762e68
Change lookup_hir_expr return type to optional

Wrap the function's return type with an optional in order to
differentiate missing values from null pointers.

gcc/rust/ChangeLog:

* backend/rust-mangle-v0.cc (v0_path): Adapt call site to new returned
type.
* util/rust-hir-map.cc (Mappings::lookup_hir_expr): Change the
function's return type.
* util/rust-hir-map.h: Update the function's prototype.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
gcc/rust/backend/rust-mangle-v0.cc
gcc/rust/util/rust-hir-map.cc
gcc/rust/util/rust-hir-map.h