diff options
author | David Blaikie <dblaikie@gmail.com> | 2013-06-22 18:59:11 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2013-06-22 18:59:11 +0000 |
commit | e88939cfebbc98133553c6fc03a52b8fb1adbb70 (patch) | |
tree | 77e225f969753e2ba81b5cd41f8c3980a446063d /lib/IR/DIBuilder.cpp | |
parent | 5b3fca50a08865f0db55fc92ad1c037a04e12177 (diff) | |
download | external_llvm-e88939cfebbc98133553c6fc03a52b8fb1adbb70.zip external_llvm-e88939cfebbc98133553c6fc03a52b8fb1adbb70.tar.gz external_llvm-e88939cfebbc98133553c6fc03a52b8fb1adbb70.tar.bz2 |
DebugInfo: Support (using GNU extensions) for template template parameters and parameter packs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184643 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR/DIBuilder.cpp')
-rw-r--r-- | lib/IR/DIBuilder.cpp | 43 |
1 files changed, 37 insertions, 6 deletions
diff --git a/lib/IR/DIBuilder.cpp b/lib/IR/DIBuilder.cpp index 6c274da..758e7cf 100644 --- a/lib/IR/DIBuilder.cpp +++ b/lib/IR/DIBuilder.cpp @@ -530,15 +530,14 @@ DIBuilder::createTemplateTypeParameter(DIDescriptor Context, StringRef Name, return DITemplateTypeParameter(MDNode::get(VMContext, Elts)); } -/// createTemplateValueParameter - Create debugging information for template -/// value parameter. DITemplateValueParameter -DIBuilder::createTemplateValueParameter(DIDescriptor Context, StringRef Name, - DIType Ty, Value *Val, - MDNode *File, unsigned LineNo, +DIBuilder::createTemplateValueParameter(unsigned Tag, DIDescriptor Context, + StringRef Name, DIType Ty, + Value *Val, MDNode *File, + unsigned LineNo, unsigned ColumnNo) { Value *Elts[] = { - GetTagConstant(VMContext, dwarf::DW_TAG_template_value_parameter), + GetTagConstant(VMContext, Tag), getNonCompileUnitScope(Context), MDString::get(VMContext, Name), Ty, @@ -550,6 +549,38 @@ DIBuilder::createTemplateValueParameter(DIDescriptor Context, StringRef Name, return DITemplateValueParameter(MDNode::get(VMContext, Elts)); } +/// createTemplateValueParameter - Create debugging information for template +/// value parameter. +DITemplateValueParameter +DIBuilder::createTemplateValueParameter(DIDescriptor Context, StringRef Name, + DIType Ty, Value *Val, + MDNode *File, unsigned LineNo, + unsigned ColumnNo) { + return createTemplateValueParameter(dwarf::DW_TAG_template_value_parameter, + Context, Name, Ty, Val, File, LineNo, + ColumnNo); +} + +DITemplateValueParameter +DIBuilder::createTemplateTemplateParameter(DIDescriptor Context, StringRef Name, + DIType Ty, StringRef Val, + MDNode *File, unsigned LineNo, + unsigned ColumnNo) { + return createTemplateValueParameter( + dwarf::DW_TAG_GNU_template_template_param, Context, Name, Ty, + MDString::get(VMContext, Val), File, LineNo, ColumnNo); +} + +DITemplateValueParameter +DIBuilder::createTemplateParameterPack(DIDescriptor Context, StringRef Name, + DIType Ty, DIArray Val, + MDNode *File, unsigned LineNo, + unsigned ColumnNo) { + return createTemplateValueParameter(dwarf::DW_TAG_GNU_template_parameter_pack, + Context, Name, Ty, Val, File, LineNo, + ColumnNo); +} + /// createClassType - Create debugging information entry for a class. DICompositeType DIBuilder::createClassType(DIDescriptor Context, StringRef Name, DIFile File, unsigned LineNumber, |