diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-08-27 11:03:07 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-27 11:03:07 +0000 |
commit | 6b42381685595c34f21d5ce9ef1c31ceac76720d (patch) | |
tree | 8117c95950db4c6872380433d18bd1beb282a500 | |
parent | a5a0287f529934634c50ce7e187d7d8a676fbef7 (diff) | |
parent | 8c6a2f1dbf8f9fba942e7be4b566f105bb21f224 (diff) | |
parent | f9e5e530391d9a98b7c965b79bebf305d2630ad7 (diff) | |
download | gcc-6b42381685595c34f21d5ce9ef1c31ceac76720d.zip gcc-6b42381685595c34f21d5ce9ef1c31ceac76720d.tar.gz gcc-6b42381685595c34f21d5ce9ef1c31ceac76720d.tar.bz2 |
Merge #648 #649
648: Fix issue with mangled name on function items with substitutions r=philberty a=philberty
Rust legacy name mangling does not contain the substitutions as part of
its mangled name for Item's. Rust avoids duplicate symbol collisions with
the legacy mangling scheme, but including a 128bit hash at the end of the
symbol, which is made up with metadata and in this case the mangled symbol
contains a hash of the type which this function is.
Fixes #647
649: Get rid of get_locus_slow r=philberty a=dkm
From Mark Wielaard: https://gcc.gnu.org/pipermail/gcc-rust/2021-August/000154.html
>
> In various places there was the following hack:
>
> /* HACK: slow way of getting location from base expression through
> virtual methods. */
> virtual Location get_locus_slow () const { return Location (); }
>
> The problem with get_locus_slow () is that if a subclass didn't
> override it then there was no real location. get_locus_slow was
> missing for Module, ExternCrate, UseDeclaration, Function, TypeAlias,
> StructStruct, TupleStruct, Enum, Union, ConstantItem, StaticItem,
> Trait, ImplBlock, ExternBlock, EmptyStmt, ExprStmtWithoutBlock and
> ExprStmtWithBlock. All do have a get_locus () function.
>
> Simply replace the get_locus_slow virtual method with a real virtual
> Location get_locus () const = 0 method so we know if something
> really doesn't have a location. This was only the case for
> MacroRulesDefinition.
Co-authored-by: Philip Herron <philip.herron@embecosm.com>
Co-authored-by: Mark Wielaard <mark@klomp.org>