OSDN Git Service

[flang][NFC] Change how error symbols are recorded
authorTim Keith <tkeith@nvidia.com>
Fri, 28 Aug 2020 17:30:23 +0000 (10:30 -0700)
committerTim Keith <tkeith@nvidia.com>
Fri, 28 Aug 2020 17:30:25 +0000 (10:30 -0700)
commit627e9007eaba39624fe92a4d97dceb18bc51f190
tree1bd2963ed07082a84a1e1caa2d643c6d0963f1ae
parent316d336dca7f64f048507f155166daa3821db957
[flang][NFC] Change how error symbols are recorded

When an error is associated with a symbol, it was marked with a flag
from Symbol::Flag. The problem with that is that you need a mutable
symbol to do that. Instead, store the set of error symbols in the
SemanticsContext. This allows for some const_casts to be eliminated.

Also, improve the internal error that occurs if SetError is called
but no fatal error has been reported.

Differential Revision: https://reviews.llvm.org/D86740
flang/include/flang/Semantics/semantics.h
flang/include/flang/Semantics/symbol.h
flang/include/flang/Semantics/type.h
flang/lib/Semantics/expression.cpp
flang/lib/Semantics/resolve-names.cpp
flang/lib/Semantics/semantics.cpp
flang/lib/Semantics/tools.cpp
flang/lib/Semantics/type.cpp