diff options
author | CohenArthur <arthur.cohen@epita.fr> | 2021-09-10 10:40:11 +0200 |
---|---|---|
committer | CohenArthur <arthur.cohen@epita.fr> | 2021-09-10 10:53:16 +0200 |
commit | d5b259a3fd40ab9ec4d9f76b50d77eb595067f81 (patch) | |
tree | cae07ec30aefc20d4b6fd3c4cb512a53ee624629 /gcc/rust/backend/rust-compile-expr.h | |
parent | e93393d007276a3335839741f45865bc05787869 (diff) | |
download | gcc-d5b259a3fd40ab9ec4d9f76b50d77eb595067f81.zip gcc-d5b259a3fd40ab9ec4d9f76b50d77eb595067f81.tar.gz gcc-d5b259a3fd40ab9ec4d9f76b50d77eb595067f81.tar.bz2 |
modules: Fix usage of path attributes and early returns
path attributes were used wrongly in two ways:
1/ The attribute's value would still contain extra data such as an equal
sign and whitespaces, which need to be discarded in order to fetch the
proper file path.
2/ #[path]s are relative to the directory where the current source file
is located. So we actually need to compute them later on down the line,
once the including directory has been figured out.
Another issue was that in the case that no candidates were found, or too
many were founds, the function `process_file_path` would still return
"successfully" despite erroring out. This causes the function to return
early and thus not assign any string to the `module_file` member.
We also have the ability to emit an error for the module's location,
which looks better for the user, instead of using a new `Location()`
like the session manager does (because it can't do otherwise)
Diffstat (limited to 'gcc/rust/backend/rust-compile-expr.h')
0 files changed, 0 insertions, 0 deletions