[PATCH] D39069: CodeGen: Fix missing debug loc due to alloca

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 23 23:45:44 PDT 2017


rjmccall added a comment.

In https://reviews.llvm.org/D39069#904507, @probinson wrote:

> Anytime the code between saveIP() and restoreIP() could set the current debug location, it needs to be saved/restored along with the insertion point.  I have to say the problem is not obvious to me here, so maybe saveIP/restoreIP should be changed (or eliminated in favor of always using InsertPointGuard).  I'm not seeing a lot of places where saveIP/restoreIP are used.


Yeah, not too many.  I'm not seeing any real reason not to just switch Clang over to always use InsertPointGuard.  (Yaxun, you don't need to do this; I'm just making a note to myself.)

John.


https://reviews.llvm.org/D39069





More information about the cfe-commits mailing list