diff options
author | Chih-Ping Chen <chih-ping.chen@intel.com> | 2022-04-06 08:22:49 -0400 |
---|---|---|
committer | Chih-Ping Chen <chih-ping.chen@intel.com> | 2022-04-15 16:38:23 -0400 |
commit | eab6e94f912d014e6f19e1737ef81e36e4601faf (patch) | |
tree | ac3aaa61d4613284e68fb869e3bc07e3f92a117b /llvm/lib/IR/DebugInfoMetadata.cpp | |
parent | 39a68cc016ec3ef51091c1469b80c6733a9b7c5f (diff) | |
download | llvm-eab6e94f912d014e6f19e1737ef81e36e4601faf.zip llvm-eab6e94f912d014e6f19e1737ef81e36e4601faf.tar.gz llvm-eab6e94f912d014e6f19e1737ef81e36e4601faf.tar.bz2 |
[DebugInfo] Add a TargetFuncName field in DISubprogram for
specifying DW_AT_trampoline as a string. Also update the signature
of DIBuilder::createFunction to reflect this addition.
Differential Revision: https://reviews.llvm.org/D123697
Diffstat (limited to 'llvm/lib/IR/DebugInfoMetadata.cpp')
-rw-r--r-- | llvm/lib/IR/DebugInfoMetadata.cpp | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/llvm/lib/IR/DebugInfoMetadata.cpp b/llvm/lib/IR/DebugInfoMetadata.cpp index 033980d..b412fb8 100644 --- a/llvm/lib/IR/DebugInfoMetadata.cpp +++ b/llvm/lib/IR/DebugInfoMetadata.cpp @@ -978,27 +978,33 @@ DISubprogram *DISubprogram::getImpl( unsigned ScopeLine, Metadata *ContainingType, unsigned VirtualIndex, int ThisAdjustment, DIFlags Flags, DISPFlags SPFlags, Metadata *Unit, Metadata *TemplateParams, Metadata *Declaration, Metadata *RetainedNodes, - Metadata *ThrownTypes, Metadata *Annotations, StorageType Storage, - bool ShouldCreate) { + Metadata *ThrownTypes, Metadata *Annotations, MDString *TargetFuncName, + StorageType Storage, bool ShouldCreate) { assert(isCanonical(Name) && "Expected canonical MDString"); assert(isCanonical(LinkageName) && "Expected canonical MDString"); + assert(isCanonical(TargetFuncName) && "Expected canonical MDString"); DEFINE_GETIMPL_LOOKUP(DISubprogram, (Scope, Name, LinkageName, File, Line, Type, ScopeLine, ContainingType, VirtualIndex, ThisAdjustment, Flags, SPFlags, Unit, TemplateParams, Declaration, - RetainedNodes, ThrownTypes, Annotations)); - SmallVector<Metadata *, 12> Ops = { + RetainedNodes, ThrownTypes, Annotations, + TargetFuncName)); + SmallVector<Metadata *, 13> Ops = { File, Scope, Name, LinkageName, Type, Unit, Declaration, RetainedNodes, - ContainingType, TemplateParams, ThrownTypes, Annotations}; - if (!Annotations) { + ContainingType, TemplateParams, ThrownTypes, Annotations, + TargetFuncName}; + if (!TargetFuncName) { Ops.pop_back(); - if (!ThrownTypes) { + if (!Annotations) { Ops.pop_back(); - if (!TemplateParams) { + if (!ThrownTypes) { Ops.pop_back(); - if (!ContainingType) + if (!TemplateParams) { Ops.pop_back(); + if (!ContainingType) + Ops.pop_back(); + } } } } |