llvm-project/flang/unittests/Evaluate
peter klausler 46ade6d0ef [flang] Order Symbols by source provenance
In parser::AllCookedSources, implement a map from CharBlocks to
the CookedSource instances that they cover.  This permits a fast
Find() operation based on std::map::equal_range to map a CharBlock
to its enclosing CookedSource instance.

Add a creation order number to each CookedSource.  This allows
AllCookedSources to provide a Precedes(x,y) predicate that is a
true source stream ordering between two CharBlocks -- x is less
than y if it is in an earlier CookedSource, or in the same
CookedSource at an earlier position.

Add a reference to the singleton SemanticsContext to each Scope.

All of this allows operator< to be implemented on Symbols by
means of a true source ordering.  From a Symbol, we get to
its Scope, then to the SemanticsContext, and then use its
AllCookedSources reference to call Precedes().

Differential Revision: https://reviews.llvm.org/D98743
2021-03-16 15:25:15 -07:00
..
CMakeLists.txt [flang] Fix build with BUILD_SHARED_LIBS=ON and FLANG_BUILD_NEW_DRIVER=ON 2020-10-15 13:03:55 +02:00
ISO-Fortran-binding.cpp [flang] Reformat with latest clang-format and .clang-format 2020-03-28 21:00:16 -07:00
bit-population-count.cpp [flang] Create a separate directory for unittests 2020-03-13 11:58:11 +00:00
expression.cpp [flang] Create a separate directory for unittests 2020-03-13 11:58:11 +00:00
folding.cpp [flang] Rework host runtime folding and enable REAL(2) folding with it. 2020-10-14 16:40:44 +02:00
fp-testing.cpp [flang] Fix setting mxcsr on MSVC 2020-07-08 07:25:25 -05:00
fp-testing.h [flang] Fix setting mxcsr on MSVC 2020-07-08 07:25:25 -05:00
integer.cpp [flang] Reformat with latest clang-format and .clang-format 2020-03-28 21:00:16 -07:00
intrinsics.cpp [flang] Order Symbols by source provenance 2021-03-16 15:25:15 -07:00
leading-zero-bit-count.cpp [flang] Create a separate directory for unittests 2020-03-13 11:58:11 +00:00
logical.cpp [flang] Reformat with latest clang-format and .clang-format 2020-03-28 21:00:16 -07:00
real.cpp [flang] Reformat with latest clang-format and .clang-format 2020-03-28 21:00:16 -07:00
reshape.cpp [flang] More Fortran runtime support for CHARACTER operations 2020-06-17 15:51:48 -07:00
testing.cpp [flang] Reformat with latest clang-format and .clang-format 2020-03-28 21:00:16 -07:00
testing.h [flang] Reformat with latest clang-format and .clang-format 2020-03-28 21:00:16 -07:00
uint128.cpp [flang] Reformat with latest clang-format and .clang-format 2020-03-28 21:00:16 -07:00