[PATCH] D88793: [flang] Fix assumptions on std::forward_list iterator implementation.

Michael Kruse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 4 00:42:00 PDT 2020


Meinersbur added a comment.

There seems to be no good reason for this strategy. Possible other implementations:

1. Use of `std::deque` which all direct insertion at the end. It also does not require an heap allocation for every element inserted.
2. Use of `std::vector`. When emitting diagnostics, all elements are copied to a `std::vector` anyway.
3. Insertion and the beginning of `std::forward_list`. Again, the list is sorted anyway before messages are printed.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88793



More information about the llvm-commits mailing list