[flang][MSVC] Use list<Message> rather than forward_list<> in Messages
authorpeter klausler <pklausler@nvidia.com>
Tue, 10 Nov 2020 22:56:51 +0000 (14:56 -0800)
committerpeter klausler <pklausler@nvidia.com>
Thu, 12 Nov 2020 00:38:38 +0000 (16:38 -0800)
commitcc575dd2cefce3170655a026dbf058a42e1a4330
tree5beea60e7bf0a2a54b27fe0cbb97ddec82f2008a
parent1630e50874a9ab6dae778bbdbb30d7dff6ade164
[flang][MSVC] Use list<Message> rather than forward_list<> in Messages

The implementation of Messages with forward_list<> makes some
nonstandard assumptions about the validity of iterators that don't
hold up with MSVC's implementation.  Use list<> instead.  The
measured performance is comparable.

This change obviated a distinction between two member functions
of Messages, and the uses of one have been replaced with calls
to the other.

Similar usage in CharBuffer was also replaced for consistency.

Differential revision: https://reviews.llvm.org/D91210
flang/include/flang/Parser/char-buffer.h
flang/include/flang/Parser/instrumented-parser.h
flang/include/flang/Parser/message.h
flang/lib/Parser/basic-parsers.h
flang/lib/Parser/char-buffer.cpp
flang/lib/Parser/message.cpp