[PATCH] D144180: [llvm][DebugInfo] Add Annotations parameter to DIBuilder::createMethod
Michael Buch via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 16 05:26:32 PST 2023
Michael137 created this revision.
Michael137 added reviewers: dblaikie, aprantl.
Herald added a subscriber: hiraditya.
Herald added a project: All.
Michael137 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
This patch adds an optional `Annotations` paramter to
`DIBuilder::createMethod` which gets simply passed to the
`DISubProgram` constructor.
This will be used to attach abi-tag annotations to
constructors/destructors in a follow-up patch.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D144180
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
@@ -886,7 +886,7 @@
unsigned LineNo, DISubroutineType *Ty, unsigned VIndex, int ThisAdjustment,
DIType *VTableHolder, DINode::DIFlags Flags,
DISubprogram::DISPFlags SPFlags, DITemplateParameterArray TParams,
- DITypeArray ThrownTypes) {
+ DITypeArray ThrownTypes, DINodeArray Annotations) {
assert(getNonCompileUnitScope(Context) &&
"Methods should have both a Context and a context that isn't "
"the compile unit.");
@@ -896,7 +896,7 @@
/*IsDistinct=*/IsDefinition, VMContext, cast<DIScope>(Context), Name,
LinkageName, F, LineNo, Ty, LineNo, VTableHolder, VIndex, ThisAdjustment,
Flags, SPFlags, IsDefinition ? CUNode : nullptr, TParams, nullptr,
- nullptr, ThrownTypes);
+ nullptr, ThrownTypes, Annotations);
if (IsDefinition)
AllSubprograms.push_back(SP);
Index: llvm/include/llvm/IR/DIBuilder.h
===================================================================
--- llvm/include/llvm/IR/DIBuilder.h
+++ llvm/include/llvm/IR/DIBuilder.h
@@ -797,15 +797,14 @@
/// \param SPFlags Additional flags specific to subprograms.
/// \param TParams Function template parameters.
/// \param ThrownTypes Exception types this function may throw.
- DISubprogram *
- createMethod(DIScope *Scope, StringRef Name, StringRef LinkageName,
- DIFile *File, unsigned LineNo, DISubroutineType *Ty,
- unsigned VTableIndex = 0, int ThisAdjustment = 0,
- DIType *VTableHolder = nullptr,
- DINode::DIFlags Flags = DINode::FlagZero,
- DISubprogram::DISPFlags SPFlags = DISubprogram::SPFlagZero,
- DITemplateParameterArray TParams = nullptr,
- DITypeArray ThrownTypes = nullptr);
+ DISubprogram *createMethod(
+ DIScope *Scope, StringRef Name, StringRef LinkageName, DIFile *File,
+ unsigned LineNo, DISubroutineType *Ty, unsigned VTableIndex = 0,
+ int ThisAdjustment = 0, DIType *VTableHolder = nullptr,
+ DINode::DIFlags Flags = DINode::FlagZero,
+ DISubprogram::DISPFlags SPFlags = DISubprogram::SPFlagZero,
+ DITemplateParameterArray TParams = nullptr,
+ DITypeArray ThrownTypes = nullptr, DINodeArray Annotations = nullptr);
/// Create common block entry for a Fortran common block.
/// \param Scope Scope of this common block.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144180.497977.patch
Type: text/x-patch
Size: 2573 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230216/9da67f90/attachment.bin>
More information about the llvm-commits
mailing list