This is an archive of the discontinued LLVM Phabricator instance.

[flang][msvc] Avoid range-based for over initializer_list. NFC.
ClosedPublic

Authored by Meinersbur on Aug 23 2020, 8:05 PM.

Details

Summary

Msvc crashes with "INTERNAL COMPILER ERROR" when iterating over an std::initializer_list in a constexpr constructor. Explicitly use the iterator instead.

This patch is part of the series to make flang compilable with MS Visual Studio.

Diff Detail

Event Timeline

Meinersbur created this revision.Aug 23 2020, 8:05 PM
Herald added a project: Restricted Project. · View Herald Transcript
isuruf accepted this revision.Aug 24 2020, 2:35 PM
This revision is now accepted and ready to land.Aug 24 2020, 2:35 PM
tskeith added inline comments.Sep 8 2020, 8:11 AM
flang/include/flang/Common/enum-set.h
40

To match the style of the flang project this should be:
for (auto it{enums.begin()}; it != enums.end(); ++it) {

Meinersbur updated this revision to Diff 290628.Sep 8 2020, 7:58 PM

Apply @tskeith's style recommendation

This revision was automatically updated to reflect the committed changes.
Meinersbur marked an inline comment as done.