[PATCH] D77168: Add a flag to debug automatic variable initialization
John McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 1 11:49:09 PDT 2020
rjmccall added inline comments.
================
Comment at: clang/lib/CodeGen/CGDecl.cpp:1814
+ if (StopAfter) {
+ static unsigned Counter = 0;
+ if (Counter >= StopAfter)
----------------
jcai19 wrote:
> rjmccall wrote:
> > srhines wrote:
> > > MaskRay wrote:
> > > > I am a bit worried about the static variable. This makes CodeGen not reusable.
> > > The counter could exist in ASTContext instead.
> > IRGenModule would be the more appropriate place.
> I can't seem to find IRGenModule. Do you mean CodeGenModule by any chance? Thanks.
Yes, sorry. The Clang and Swift frontends use slightly different names for the same concept.
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