[PATCH] D144503: [ADT] Allow `llvm::enumerate` to enumerate over multiple ranges

Jakub Kuderski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 16 18:14:46 PDT 2023


kuhar added a comment.

In D144503#4201034 <https://reviews.llvm.org/D144503#4201034>, @srj wrote:

> There is also a similar breakage in InstrInfoEmitter.cpp:
>
>   C:\build_bot\worker\llvm-17-x86-32-windows\llvm-project\llvm\utils\TableGen\InstrInfoEmitter.cpp(120): error C2440: 'initializing': cannot convert from 'size_t' to '_This'
>           with
>           [
>               _This=llvm::Record *const &
>           ]

Hi @srj,

Is there some public buildbot that experienced the same failure? Do you have some info on the build environment, version of the compiler, etc? I haven't seen this affect other windows buildbots.
If this is blocking you and you need a quick fix isolated to these two places, I suggest patching these two loops something like this:

  for (const auto &En :
       enumerate(Intrinsic.ArgumentAttributes)) {
       size_t AttrIdx = En.index();
       auto& Attrs = En.value();

or even with manual indexing:

  size_t AttrIdx = 0;
   for (const auto &Attrs : Intrinsic.ArgumentAttributes) {
        
    ...
    ++AttIdx;
  }   




Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D144503



More information about the llvm-commits mailing list