[PATCH] D77168: Add a flag to debug automatic variable initialization
Stephen Hines via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 1 11:31:44 PDT 2020
srhines added a comment.
In D77168#1955312 <https://reviews.llvm.org/D77168#1955312>, @jfb wrote:
> Do you not think `pragma` is a more general approach? That's what's used in a bunch of other cases, and I'd like to see it attempted here.
> If not, I agree with John that just counting up isn't a good bisection experience. I'd rather see a begin / end bound.
I agree that begin/end is actually better.
My experience has been that you really don't want to be modifying source files if you can avoid it, as that is harder to automate in a script. And you do want to script this kind of debugging because it isn't a compiler crash, it's often a runtime issue that might take longer to reproduce/etc., so I think that it is preferable to remove the human (error prone) element of adding/tweaking pragmas. I did say that the pragmas are useful in other ways, but I don't think that it is effective for everything.
> You're also missing the auto-init in `initializeAlloca`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77168/new/
https://reviews.llvm.org/D77168
More information about the cfe-commits
mailing list