This is an archive of the discontinued LLVM Phabricator instance.

Add support for sythetic operator dereference
ClosedPublic

Authored by tberghammer on Mar 25 2017, 6:58 AM.

Details

Summary

After this change a sythetic child provider can generate a special child
named "$$dereference$$" what if present is used when "operator*" or
"operator->" used on a ValueObject. The goal of the change is to make
expressions like "up->foo" work inside the "frame variable" command.

Diff Detail

Repository
rL LLVM

Event Timeline

tberghammer created this revision.Mar 25 2017, 6:58 AM
jingham requested changes to this revision.Mar 27 2017, 10:28 AM

The idea here seems fine, but why does StackFrame have to know the magic $$dereference$$? Why can't it call the Dereference on the synthetic value?

This revision now requires changes to proceed.Mar 27 2017, 10:28 AM
tberghammer edited edge metadata.

Changed StackFrame to use Dereference instead of accessing the $$dereference$$ magic field.

jingham requested changes to this revision.Mar 28 2017, 10:32 AM

This seems great. The only remaining thing is to document this in the Synthetic Children section of the Variable Formatting page (www/varformats.html).

This revision now requires changes to proceed.Mar 28 2017, 10:32 AM
tberghammer edited edge metadata.

Add documentation to the website

jingham requested changes to this revision.Mar 30 2017, 12:45 PM

One grammar comment in the docs, and then this is good.

www/varformats.html
1071 ↗(On Diff #93525)

grammar: "what will be" -> "which will be"

Though I think it would be clearer to say:

If a synthetic child provider supplies a special child named $$dereference$$ it will be...

This revision now requires changes to proceed.Mar 30 2017, 12:45 PM
tberghammer edited edge metadata.

Fix grammer for the html documentation.

tberghammer marked an inline comment as done.Mar 30 2017, 12:59 PM
jingham accepted this revision.Mar 30 2017, 1:01 PM

Excellent!

This revision is now accepted and ready to land.Mar 30 2017, 1:01 PM
This revision was automatically updated to reflect the committed changes.