[DebugInfo] Support for DW_TAG_generic_subrange
authorAlok Kumar Sharma <AlokKumar.Sharma@amd.com>
Wed, 28 Oct 2020 14:24:39 +0000 (19:54 +0530)
committerAlok Kumar Sharma <AlokKumar.Sharma@amd.com>
Wed, 28 Oct 2020 20:04:15 +0000 (01:34 +0530)
commita6dd01afa3d5902203d04a72e0b478078f796a35
tree9233c88a46e1d1f7d57f70734a57a0fc802d0f9a
parent3b2256a41b062ff5e9dcf52a99b945cadf2388d1
[DebugInfo] Support for DW_TAG_generic_subrange

This is needed to support fortran assumed rank arrays which
have runtime rank.

  Summary:
Fortran assumed rank arrays have dynamic rank. DWARF TAG
DW_TAG_generic_subrange is needed to support that.

  Testing:
unit test cases added (hand-written)
check llvm
check debug-info

Reviewed By: aprantl

Differential Revision: https://reviews.llvm.org/D89218
27 files changed:
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/DwarfCompileUnit.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp
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/Bitcode/generic_subrange.ll [new file with mode: 0644]
llvm/test/Bitcode/generic_subrange_const.ll [new file with mode: 0644]
llvm/test/Bitcode/generic_subrange_count.ll [new file with mode: 0644]
llvm/test/DebugInfo/X86/dwarfdump-generic_subrange.ll [new file with mode: 0644]
llvm/test/DebugInfo/X86/dwarfdump-generic_subrange_const.ll [new file with mode: 0644]
llvm/test/DebugInfo/X86/dwarfdump-generic_subrange_count.ll [new file with mode: 0644]
llvm/test/Verifier/digenericsubrange-count-upperBound.ll [new file with mode: 0644]
llvm/test/Verifier/digenericsubrange-missing-stride.ll [new file with mode: 0644]
llvm/test/Verifier/digenericsubrange-missing-upperBound.ll [new file with mode: 0644]
llvm/unittests/IR/MetadataTest.cpp