[PATCH] D80865: [TableGen] defm in a loop is not final (bug fix)

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 16 21:51:02 PDT 2020


hfinkel marked an inline comment as done.
hfinkel added inline comments.


================
Comment at: llvm/test/TableGen/foreach-multiclass.td:98
 
   foreach _ = !if(b, [0], []<int>) in
   def B;
----------------
simon_tatham wrote:
> Of course, we've got a proper `if` statement now! I wonder if it's worth checking that this construction works with that as well as with the `foreach` dodge?
> 
> (It should, because if I remember, `if` expands to that anyway under the hood. But just in case the implementation changes in future, perhaps.)
Yep. In real life, I'm using it with the if statement. Because if expands to this, I put it in the test this way (because this is the foreach-multiclass test, and to make it clearer how the test corresponded to the fix). Would you prefer that I also explicitly add a test with an if statement?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80865/new/

https://reviews.llvm.org/D80865





More information about the llvm-commits mailing list