[all-commits] [llvm/llvm-project] 3a5792: [flang][debug] Handle allocatable strings. (#95906)

Abid Qadeer via All-commits all-commits at lists.llvm.org
Mon Jun 24 10:04:40 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3a57925b071f16c64af6a729078dce58510a0da9
      https://github.com/llvm/llvm-project/commit/3a57925b071f16c64af6a729078dce58510a0da9
  Author: Abid Qadeer <haqadeer at amd.com>
  Date:   2024-06-24 (Mon, 24 Jun 2024)

  Changed paths:
    M flang/lib/Optimizer/Transforms/DebugTypeGenerator.cpp
    M flang/lib/Optimizer/Transforms/DebugTypeGenerator.h
    M flang/test/Integration/debug-char-type-1.f90
    M flang/test/Transforms/debug-char-type-1.fir

  Log Message:
  -----------
  [flang][debug] Handle allocatable strings. (#95906)

The allocatable strings also use DIStringType but provide dwarf
expressions to find the location and length of the string. With this
change in place, the debugging of the allocatable strings looks like
this:

  character(len=:), allocatable :: first
  character(len=:), allocatable :: second
  character(len=:), allocatable :: third

  first = 'Mount'
  second = 'Everest'
  third = first // " " // second
  print *, third

(gdb) p third
$1 = ""
(gdb) n
18        print *, third
(gdb) p third
$2 = 'Mount Everest'
(gdb) ptype third
type = character (13)



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list