[PATCH] D37428: Debug info: Fixed faulty debug locations for attributed statements

Karl-Johan Karlsson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 5 09:10:32 PDT 2017


Ka-Ka added a comment.

In https://reviews.llvm.org/D37428#861140, @dblaikie wrote:

> Not sure what you mean by "avoid emitting unnecessary stop points" - do you have a test case for that?


In my previous patch you could end up doing two calls to EmitStopPoint() for the same statement. In the previous patch I added a EmitStopPoint() in the method EmitAttributedStmt(), but if you took the default clause in the switch statement in the same method you could end up executing another EmitStopPoint() in EmitStmt().

The new patch do not have the issue with executing EmitStopPoint() twice for the same statement. I think generally that the new patch is more robust solution.


https://reviews.llvm.org/D37428





More information about the cfe-commits mailing list