This is an archive of the discontinued LLVM Phabricator instance.

[ADT] Work around `enumerate` compilation error with modules enabled
ClosedPublic

Authored by kuhar on Mar 17 2023, 4:56 PM.

Details

Summary

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.

Diff Detail

Event Timeline

kuhar created this revision.Mar 17 2023, 4:56 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 17 2023, 4:56 PM
Herald added a subscriber: hanchung. · View Herald Transcript
kuhar requested review of this revision.Mar 17 2023, 4:56 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 17 2023, 4:56 PM
kuhar updated this revision to Diff 506333.Mar 18 2023, 2:43 PM

Do not calculate sizes in non-debug builds

Oh wait, I didn't realize you haven't landed it yet :-)

aprantl accepted this revision.Mar 20 2023, 11:20 AM
This revision is now accepted and ready to land.Mar 20 2023, 11:20 AM
This revision was landed with ongoing or failed builds.Mar 20 2023, 11:35 AM
This revision was automatically updated to reflect the committed changes.

Thanks! It works.