[all-commits] [llvm/llvm-project] 7e4f7f: [flang][debug] Support fixed size character type. ...

Abid Qadeer via All-commits all-commits at lists.llvm.org
Mon Jun 17 03:57:24 PDT 2024


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

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

  Log Message:
  -----------
  [flang][debug] Support fixed size character type. (#95462)

This PR adds debug support for fixed size character type. The character
type gets translated to DIStringType.

As I have noticed in comments, currently DIStringType does not have a
way to represent the underlying character type of the string. This
restricts our ability to represent wide string. As an example, this is
how the debugger shows 2 different type of string. Note that non-ascii
characters work ok with default kind string.

  character(kind=4, len=5) :: str1
  character(len=16) :: str2
  str1 = 'hello'
  str2 = 'π = 3.14'

(gdb) p str1
$1 = 'h\000\000\000e\000\000\000l\000\000\000l\000\000\000o\000\000\000'

(gdb) p str2
$2 = 'π = 3.14       '



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