[all-commits] [llvm/llvm-project] c87e94: [flang] Get ProvenanceRange from CharBlock startin...

jeanPerier via All-commits all-commits at lists.llvm.org
Fri Jan 12 04:05:02 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c87e94b0303cef11d24c5a3cf14bec570d850362
      https://github.com/llvm/llvm-project/commit/c87e94b0303cef11d24c5a3cf14bec570d850362
  Author: jeanPerier <jperier at nvidia.com>
  Date:   2024-01-12 (Fri, 12 Jan 2024)

  Changed paths:
    M flang/include/flang/Parser/provenance.h
    M flang/lib/Parser/provenance.cpp
    M flang/test/Lower/macro-debug-file-loc.f90
    A flang/test/Semantics/assign15.f90

  Log Message:
  -----------
  [flang] Get ProvenanceRange from CharBlock starting with expanded macro (#77791)

When a CharBlock starts with an expanded macro but does not end in this
macro expansion, GetProvenanceRange fails to return a ProvenanceRange
which may cause error message to be emitted without location or lowering
to emit code without source location (which is problematic if this code
contains calls to procedures defined in the same file since LLVM will
later crash with the error:
"inlinable function call in a function with a DISubprogram location must
have a debug location"

Fix this situation by returning the ProvenanceRange starting at the
replaced macro reference.




More information about the All-commits mailing list