[ADT] Work around `enumerate` compilation error with modules enabled
authorJakub Kuderski <kubak@google.com>
Mon, 20 Mar 2023 18:27:50 +0000 (14:27 -0400)
committerJakub Kuderski <kubak@google.com>
Mon, 20 Mar 2023 18:27:51 +0000 (14:27 -0400)
commit92416b63a57b74689abc175bcafd97b674ff9728
tree82ea326c82240a50eb30ed4d31cea9f3cd4353cc
parent272ebd6957ef7bd39a6c6d2aaf7249d86e09791b
[ADT] Work around `enumerate` compilation error with modules enabled

This manifests on Apple clang 14 with `-DLLVM_ENABLE_MODULES=1` and
`-DLLVM_ENABLE_ASSERTIONS=1` and seems like a host compiler bug.

Sample compilation failure:
https://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/52513/consoleFull#-458239162a1ca8a51-895e-46c6-af87-ce24fa4cd561.

Reviewed By: aprantl

Differential Revision: https://reviews.llvm.org/D146340
llvm/include/llvm/ADT/STLExtras.h