[PATCH] D86305: [DebugInfo]Added support for representing Fortran assumed length strings
Sourabh Singh Tomar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 20 09:53:08 PDT 2020
SouraVX created this revision.
SouraVX added reviewers: aprantl, schweitz, jini.susan.george, alok.
Herald added a reviewer: deadalnix.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a reviewer: DavidTruby.
Herald added a reviewer: sscalpone.
Herald added a project: LLVM.
SouraVX requested review of this revision.
Herald added a subscriber: ormris.
This patch adds support for representing Fortran `character(n)`.
Primarily patch is based out of D54114 <https://reviews.llvm.org/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'
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D86305
Files:
llvm/docs/SourceLevelDebugging.rst
llvm/include/llvm-c/DebugInfo.h
llvm/include/llvm/Bitcode/LLVMBitCodes.h
llvm/include/llvm/IR/DIBuilder.h
llvm/include/llvm/IR/DebugInfoMetadata.h
llvm/include/llvm/IR/Metadata.def
llvm/lib/AsmParser/LLParser.cpp
llvm/lib/Bitcode/Reader/MetadataLoader.cpp
llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h
llvm/lib/IR/AsmWriter.cpp
llvm/lib/IR/DIBuilder.cpp
llvm/lib/IR/DebugInfoMetadata.cpp
llvm/lib/IR/LLVMContextImpl.h
llvm/lib/IR/Verifier.cpp
llvm/test/DebugInfo/distringtype.ll
llvm/test/DebugInfo/fortran-string-type.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86305.286843.patch
Type: text/x-patch
Size: 32390 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200820/3fa535d6/attachment.bin>
More information about the llvm-commits
mailing list