This is an archive of the discontinued LLVM Phabricator instance.

[MLIR][NFC] Inline lambda to workaround gcc 9.1/9.2 bug
ClosedPublic

Authored by kiranchandramohan on Jun 15 2020, 1:18 AM.

Details

Summary

gcc 9.1/9.2 has a bug (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90538) which leads to an incorrect error when expanding parameter packs multiple times in a lambda. Code introduced in D79296 hits this issue. Inlining this lambda to work around this issue.

Diff Detail

Event Timeline

CarolineConcatto added a comment.EditedJun 15 2020, 5:38 AM

It now works with gcc9.2. I did not try with other compilers.
Is is too much to ask to write the reason it is implemented the way it is?
Maybe say that this was a lambda function that needed to be expanded.
But otherwise it looks fine to me

rriddle accepted this revision.Jun 15 2020, 1:38 PM
This revision is now accepted and ready to land.Jun 15 2020, 1:38 PM
This revision was automatically updated to reflect the committed changes.