[all-commits] [llvm/llvm-project] f91d18: [DebugInfo][flang]Added support for representing F...

Sourabh Singh Tomar via All-commits all-commits at lists.llvm.org
Fri Aug 21 21:44:16 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: f91d18eaa946b2d2ea5a9334fb099c3e409ad2d1
      https://github.com/llvm/llvm-project/commit/f91d18eaa946b2d2ea5a9334fb099c3e409ad2d1
  Author: Sourabh Singh Tomar <SourabhSingh.Tomar at amd.com>
  Date:   2020-08-22 (Sat, 22 Aug 2020)

  Changed paths:
    M llvm/docs/SourceLevelDebugging.rst
    M llvm/include/llvm-c/DebugInfo.h
    M llvm/include/llvm/Bitcode/LLVMBitCodes.h
    M llvm/include/llvm/IR/DIBuilder.h
    M llvm/include/llvm/IR/DebugInfoMetadata.h
    M llvm/include/llvm/IR/Metadata.def
    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/DebugLocEntry.h
    M llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
    M llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
    M llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h
    M llvm/lib/IR/AsmWriter.cpp
    M llvm/lib/IR/DIBuilder.cpp
    M llvm/lib/IR/DebugInfoMetadata.cpp
    M llvm/lib/IR/LLVMContextImpl.h
    M llvm/lib/IR/Verifier.cpp
    A llvm/test/DebugInfo/distringtype.ll
    A llvm/test/DebugInfo/fortran-string-type.ll

  Log Message:
  -----------
  [DebugInfo][flang]Added support for representing Fortran assumed length strings

This patch adds support for representing Fortran `character(n)`.

Primarily patch is based out of D54114 with appropriate modifications.

Test case IR is generated using our downstream classic-flang. We're in process
of upstreaming flang PR's but classic-flang has dependencies on llvm, so
this has to get in first.

Patch includes functional test case for both IR and corresponding
dwarf, furthermore it has been manually tested as well using GDB.

Source snippet:
```
 program assumedLength
   call sub('Hello')
   call sub('Goodbye')
   contains
   subroutine sub(string)
           implicit none
           character(len=*), intent(in) :: string
           print *, string
   end subroutine sub
 end program assumedLength
```

GDB:
```
(gdb) ptype string
type = character (5)
(gdb) p string
$1 = 'Hello'
```

Reviewed By: aprantl, schweitz

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




More information about the All-commits mailing list