[PATCH] D51976: [DebugInfo][Dexter] Speculated BB presents illegal variable value to debugger
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 13 09:24:31 PDT 2018
dblaikie added inline comments.
================
Comment at: lib/Transforms/Utils/Local.cpp:2528
+ findDbgUsers(DbgUsers, &I);
+ for (DbgVariableIntrinsic *DII : DbgUsers)
+ DII->eraseFromParent();
----------------
CarlosAlbertoEnciso wrote:
> CarlosAlbertoEnciso wrote:
> > TWeaver wrote:
> > > TWeaver wrote:
> > > > I'd use for (auto &DII : DbgUsers) here. The type is obvious from the declaration of DbgUsers. This should make this line a little easier on the eyes.
> > > is DII the correct name for the iterator here? should this be DVI inline with the name of the type used in the declaration of DbgUsers?
> > >
> > > That is : DVI for DbgVariableIntrinsic.
> > Changing the loop to `for (auto &DII : DbgUsers)`.
> I can see your point.
>
> The `SmallVector<DbgVariableIntrinsic *, 1>` is used in quite few other places and it seems the `DII` is the standard name used for the iterator.
>
> I would prefer to follow that name convention.
One tweak on this - if you're deducing a pointer with 'auto', LLVM style prefers to be explicit about that, so write "auto *X" rather than "auto &X" (assuming a reference isn't actually needed here, which it seems not)
Repository:
rL LLVM
https://reviews.llvm.org/D51976
More information about the llvm-commits
mailing list