[PATCH] D89817: [DebugInfo] Expose Fortran array debug info attributes through DIBuilder.
Chih-Ping Chen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 20 12:40:20 PDT 2020
cchen15 created this revision.
cchen15 added a reviewer: aprantl.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
cchen15 requested review of this revision.
The support of a few debug info attributes specifically for Fortran arrays have been added to LLVM recently, but there's no way to take advantage of them through DIBuilder. This patch extends DIBuilder::createArrayType to enable the settings of those attributes.
https://reviews.llvm.org/D89817
Files:
llvm/include/llvm/IR/DIBuilder.h
llvm/lib/IR/DIBuilder.cpp
Index: llvm/lib/IR/DIBuilder.cpp
===================================================================
--- llvm/lib/IR/DIBuilder.cpp
+++ llvm/lib/IR/DIBuilder.cpp
@@ -527,10 +527,15 @@
DICompositeType *DIBuilder::createArrayType(uint64_t Size,
uint32_t AlignInBits, DIType *Ty,
- DINodeArray Subscripts) {
+ DINodeArray Subscripts,
+ Metadata *DataLocation,
+ Metadata *Associated,
+ Metadata *Allocated) {
auto *R = DICompositeType::get(VMContext, dwarf::DW_TAG_array_type, "",
nullptr, 0, nullptr, Ty, Size, AlignInBits, 0,
- DINode::FlagZero, Subscripts, 0, nullptr);
+ DINode::FlagZero, Subscripts, 0, nullptr,
+ nullptr, "", nullptr, DataLocation,
+ Associated, Allocated);
trackIfUnresolved(R);
return R;
}
Index: llvm/include/llvm/IR/DIBuilder.h
===================================================================
--- llvm/include/llvm/IR/DIBuilder.h
+++ llvm/include/llvm/IR/DIBuilder.h
@@ -494,8 +494,14 @@
/// \param AlignInBits Alignment.
/// \param Ty Element type.
/// \param Subscripts Subscripts.
+ /// \param DataLocation Where to find the raw data of a Fortran array
+ /// \param Associated Where to find the associated attribute of a Fortran array.
+ /// \param Allocated Where to find the allocated attribute of a Fortran array.
DICompositeType *createArrayType(uint64_t Size, uint32_t AlignInBits,
- DIType *Ty, DINodeArray Subscripts);
+ DIType *Ty, DINodeArray Subscripts,
+ Metadata *DataLocation = nullptr,
+ Metadata *Associated = nullptr,
+ Metadata *Allocated = nullptr);
/// Create debugging information entry for a vector type.
/// \param Size Array size.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89817.299441.patch
Type: text/x-patch
Size: 2265 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201020/2b4a74f8/attachment.bin>
More information about the llvm-commits
mailing list