[DebugInfo] Add handling of stringLengthExp operand of DIStringType.
authorChih-Ping Chen <chih-ping.chen@intel.com>
Tue, 8 Dec 2020 18:34:33 +0000 (13:34 -0500)
committerChih-Ping Chen <chih-ping.chen@intel.com>
Tue, 8 Dec 2020 19:49:59 +0000 (14:49 -0500)
commit1f67247eea13f62f26de3b0eca3755ed8b3a2b8e
treec7b662b86c94b86bf0fe8317f6a50c7597f636af
parentdee1e6ac42e6e25e639fb053831f0723b90c18bd
[DebugInfo] Add handling of stringLengthExp operand of DIStringType.

This patch makes DWARF writer emit DW_AT_string_length using
the stringLengthExp operand of DIStringType.

This is part of the effort to add debug info support for
Fortran deferred length strings.

Also updated the tests to exercise the change.

Differential Revision: https://reviews.llvm.org/D92412
llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
llvm/test/DebugInfo/X86/distringtype.ll
llvm/test/DebugInfo/fortran-string-type.ll