[all-commits] [llvm/llvm-project] 52a134: [flang] Distinguish intrinsic from non-intrinsic m...

Peter Klausler via All-commits all-commits at lists.llvm.org
Mon Jan 31 13:31:42 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 52a1346b78b0971b6a89c53a6881cb9655e81245
      https://github.com/llvm/llvm-project/commit/52a1346b78b0971b6a89c53a6881cb9655e81245
  Author: Peter Klausler <pklausler at nvidia.com>
  Date:   2022-01-31 (Mon, 31 Jan 2022)

  Changed paths:
    M flang/include/flang/Parser/parsing.h
    M flang/include/flang/Parser/provenance.h
    M flang/include/flang/Semantics/scope.h
    M flang/include/flang/Semantics/semantics.h
    M flang/lib/Frontend/CompilerInvocation.cpp
    M flang/lib/Lower/Mangler.cpp
    M flang/lib/Parser/parsing.cpp
    M flang/lib/Parser/provenance.cpp
    M flang/lib/Semantics/mod-file.cpp
    M flang/lib/Semantics/mod-file.h
    M flang/lib/Semantics/resolve-names.cpp
    M flang/lib/Semantics/resolve-names.h
    M flang/lib/Semantics/scope.cpp
    M flang/lib/Semantics/semantics.cpp
    M flang/lib/Semantics/symbol.cpp
    M flang/lib/Semantics/tools.cpp
    A flang/test/Semantics/modfile43.f90

  Log Message:
  -----------
  [flang] Distinguish intrinsic from non-intrinsic modules

For "USE, INTRINSIC", search only for intrinsic modules;
for "USE, NON_INTRINSIC", do not recognize intrinsic modules.
Allow modules of both kinds with the same name to be used in
the same source file (but not in the same scoping unit, a
constraint of the standard that is now enforced).

The symbol table's scope tree now has a single instance of
a scope with a new kind, IntrinsicModules, whose children are
the USE'd intrinsic modules (explicit or not).  This separate
"top-level" scope is a child of the single global scope and
it allows both intrinsic and non-intrinsic modules of the same
name to exist in the symbol table.  Intrinsic modules' scopes'
symbols now have the INTRINSIC attribute set.

The search path directories need to make a distinction between
regular directories and the one(s) that point(s) to intrinsic
modules.  I allow for multiple intrinsic module directories in
the second search path, although only one is needed today.

Differential Revision: https://reviews.llvm.org/D118631




More information about the All-commits mailing list