Page MenuHomePhabricator

IAS: Use the root macro instanciation for location

Authored by friss on Jun 15 2015, 4:57 PM.



In r224810 you fixed the handling of debug locations in AsmParser. I think this
patch brings it closer to what you ireally wanted (or I misunderstood the logic
there): it uses the first macro of the macro stack instead of the last one. The
updated testcase shows that the current scheme doesn't work when macro
instanciations are nested and multiple files are used.

The case where '# <line> "<file>"' directives are present in the macro themselves
isn't handled by this patch, and I'm not sure we want it handled (what should the
behavior be?)

Diff Detail


Event Timeline

friss updated this revision to Diff 27728.Jun 15 2015, 4:57 PM
friss retitled this revision from to IAS: Use the root macro instanciation for location.
friss updated this object.
friss added a reviewer: compnerd.
friss added a subscriber: Unknown Object (MLST).
compnerd accepted this revision.Jun 15 2015, 7:13 PM
compnerd edited edge metadata.

Yeah, the change looks right. I think it would be better if you checked the debug info on the second case as well. Thanks for fixing my oversight!

This revision is now accepted and ready to land.Jun 15 2015, 7:13 PM
friss added a comment.Jun 15 2015, 9:04 PM

What do you mean by "checking the debug info on the other case as well" ? Also using directly the first macro and show that it still works?

This revision was automatically updated to reflect the committed changes.