summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/DebugInfoMetadata.cpp
diff options
context:
space:
mode:
authorMatthew Voss <matthew.voss@sony.com>2018-10-03 18:44:53 +0000
committerMatthew Voss <matthew.voss@sony.com>2018-10-03 18:44:53 +0000
commitf8ab35a4f464753751c1df2b56b6c2f9c75d56a7 (patch)
treecd817f07400276d4cf0efea2832f29c75c4d7963 /llvm/lib/IR/DebugInfoMetadata.cpp
parentb80d27a916988f45fa851f23dbb0cdb5649916f7 (diff)
downloadbcm5719-llvm-f8ab35a4f464753751c1df2b56b6c2f9c75d56a7.tar.gz
bcm5719-llvm-f8ab35a4f464753751c1df2b56b6c2f9c75d56a7.zip
Emit template type and value parameter DIEs for template variables.
Summary: Ensure the TemplateParam attribute of the DIGlobalVariable node is translated into the proper DIEs. Resolves https://bugs.llvm.org/show_bug.cgi?id=22119 Reviewers: dblaikie, probinson, aprantl, JDevlieghere, clayborg, whitequark, deadalnix Reviewed By: dblaikie Subscribers: llvm-commits Tags: #debug-info Differential Revision: https://reviews.llvm.org/D52057 llvm-svn: 343706
Diffstat (limited to 'llvm/lib/IR/DebugInfoMetadata.cpp')
-rw-r--r--llvm/lib/IR/DebugInfoMetadata.cpp25
1 files changed, 15 insertions, 10 deletions
diff --git a/llvm/lib/IR/DebugInfoMetadata.cpp b/llvm/lib/IR/DebugInfoMetadata.cpp
index de72edebc4c..bb49cb2109a 100644
--- a/llvm/lib/IR/DebugInfoMetadata.cpp
+++ b/llvm/lib/IR/DebugInfoMetadata.cpp
@@ -653,19 +653,24 @@ DIGlobalVariable::getImpl(LLVMContext &Context, Metadata *Scope, MDString *Name,
MDString *LinkageName, Metadata *File, unsigned Line,
Metadata *Type, bool IsLocalToUnit, bool IsDefinition,
Metadata *StaticDataMemberDeclaration,
- uint32_t AlignInBits, StorageType Storage,
- bool ShouldCreate) {
+ Metadata *TemplateParams, uint32_t AlignInBits,
+ StorageType Storage, bool ShouldCreate) {
assert(isCanonical(Name) && "Expected canonical MDString");
assert(isCanonical(LinkageName) && "Expected canonical MDString");
- DEFINE_GETIMPL_LOOKUP(DIGlobalVariable,
- (Scope, Name, LinkageName, File, Line, Type,
- IsLocalToUnit, IsDefinition,
- StaticDataMemberDeclaration, AlignInBits));
- Metadata *Ops[] = {
- Scope, Name, File, Type, Name, LinkageName, StaticDataMemberDeclaration};
+ DEFINE_GETIMPL_LOOKUP(DIGlobalVariable, (Scope, Name, LinkageName, File, Line,
+ Type, IsLocalToUnit, IsDefinition,
+ StaticDataMemberDeclaration,
+ TemplateParams, AlignInBits));
+ Metadata *Ops[] = {Scope,
+ Name,
+ File,
+ Type,
+ Name,
+ LinkageName,
+ StaticDataMemberDeclaration,
+ TemplateParams};
DEFINE_GETIMPL_STORE(DIGlobalVariable,
- (Line, IsLocalToUnit, IsDefinition, AlignInBits),
- Ops);
+ (Line, IsLocalToUnit, IsDefinition, AlignInBits), Ops);
}
DILocalVariable *DILocalVariable::getImpl(LLVMContext &Context, Metadata *Scope,
OpenPOWER on IntegriCloud