[all-commits] [llvm/llvm-project] 627e90: [flang][NFC] Change how error symbols are recorded

Tim Keith via All-commits all-commits at lists.llvm.org
Fri Aug 28 10:31:08 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 627e9007eaba39624fe92a4d97dceb18bc51f190
      https://github.com/llvm/llvm-project/commit/627e9007eaba39624fe92a4d97dceb18bc51f190
  Author: Tim Keith <tkeith at nvidia.com>
  Date:   2020-08-28 (Fri, 28 Aug 2020)

  Changed paths:
    M flang/include/flang/Semantics/semantics.h
    M flang/include/flang/Semantics/symbol.h
    M flang/include/flang/Semantics/type.h
    M flang/lib/Semantics/expression.cpp
    M flang/lib/Semantics/resolve-names.cpp
    M flang/lib/Semantics/semantics.cpp
    M flang/lib/Semantics/tools.cpp
    M flang/lib/Semantics/type.cpp

  Log Message:
  -----------
  [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




More information about the All-commits mailing list