[PATCH] D132223: [Assignment Tracking][4/*] Add llvm.dbg.assign intrinsic boilerplate
Jeremy Morse via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 6 08:11:34 PDT 2022
jmorse added inline comments.
================
Comment at: llvm/lib/IR/IntrinsicInst.cpp:86
+ return false;
+ DAI->setAddress(NewValue);
+ return true;
----------------
Orlando wrote:
> jmorse wrote:
> > Hmmmm. So this is called _inside_ an assertion, but it also has a side-effect / assignment... doesn't that mean we'll get different behaviour if LLVM is compiled with/without assertions?
> `DbgAssignAddrReplaced ` is a bool assigned the result of the in-line call to the lambda. I can re-arrange this to get rid of the lambda if you'd prefer?
Aaaaaahhhh cool, I'd missed the trailing parentheses (and "bool" became "auto" in my mind for some reason). I'm not especially bothered about the style, but IMO best to have a dedicated line where the lambda is called, so that someone casually scanning this sees "here's a lambda, here's me calling the lambda". I think that matches the pattern in the rest of llvm.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132223/new/
https://reviews.llvm.org/D132223
More information about the llvm-commits
mailing list