Commit 8af2826b by Ian Lance Taylor

compiler: ignore aliases in fieldtrack info

    
    We want to track references to fields in the real struct, not in
    aliases to the struct.
    
    Reviewed-on: https://go-review.googlesource.com/96816

From-SVN: r257954
parent 161ac473
ed8647cc99652db2d689215c05f31ad038438a7e 8b3d6091801d485c74a9c92740c69673e39160b0
The first line of this file holds the git revision number of the last The first line of this file holds the git revision number of the last
merge done from the gofrontend repository. merge done from the gofrontend repository.
...@@ -11696,7 +11696,7 @@ Field_reference_expression::do_lower(Gogo* gogo, Named_object* function, ...@@ -11696,7 +11696,7 @@ Field_reference_expression::do_lower(Gogo* gogo, Named_object* function,
Location loc = this->location(); Location loc = this->location();
std::string s = "fieldtrack \""; std::string s = "fieldtrack \"";
Named_type* nt = this->expr_->type()->named_type(); Named_type* nt = this->expr_->type()->unalias()->named_type();
if (nt == NULL || nt->named_object()->package() == NULL) if (nt == NULL || nt->named_object()->package() == NULL)
s.append(gogo->pkgpath()); s.append(gogo->pkgpath());
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment