[all-commits] [llvm/llvm-project] 28bfa5: [DebugInfo] Add stringLocationExp field to DIStrin...

Chih-Ping Chen via All-commits all-commits at lists.llvm.org
Wed Jan 26 08:57:35 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 28bfa57a7315c3161124c90b4d52f467616dc92e
      https://github.com/llvm/llvm-project/commit/28bfa57a7315c3161124c90b4d52f467616dc92e
  Author: Chih-Ping Chen <chih-ping.chen at intel.com>
  Date:   2022-01-26 (Wed, 26 Jan 2022)

  Changed paths:
    M llvm/include/llvm/IR/DebugInfoMetadata.h
    M llvm/lib/AsmParser/LLParser.cpp
    M llvm/lib/Bitcode/Reader/MetadataLoader.cpp
    M llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
    M llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
    M llvm/lib/IR/AsmWriter.cpp
    M llvm/lib/IR/DebugInfoMetadata.cpp
    M llvm/lib/IR/LLVMContextImpl.h
    A llvm/test/Bitcode/distringtype-backward.ll
    A llvm/test/Bitcode/distringtype-backward.ll.bc
    M llvm/test/DebugInfo/X86/distringtype.ll
    M llvm/test/DebugInfo/fortran-string-type.ll

  Log Message:
  -----------
  [DebugInfo] Add stringLocationExp field to DIStringType

DIStringType is used to encode the debug info of a character object
in Fortran. A Fortran deferred-length character object is typically
implemented as a pair of the following two pieces of info: An address
of the raw storage of the characters, and the length of the object.
The stringLocationExp field contains the DIExpression to get to the
raw storage.

This patch also enables the emission of DW_AT_data_location attribute
in a DW_TAG_string_type debug info entry based on stringLocationExp
in DIStringType.

A test is also added to ensure that the bitcode reader is backward
compatible with the old DIStringType format.

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




More information about the All-commits mailing list