[llvm] 2dff41c - [llvm][DebugInfo] Add IsDefault parameter to DIBuilder::createTemplateTemplateParameter
Michael Buch via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 16 03:39:14 PST 2022
Author: Michael Buch
Date: 2022-12-16T11:38:53Z
New Revision: 2dff41c320fcf6230bea68568b14ca101c96d187
URL: https://github.com/llvm/llvm-project/commit/2dff41c320fcf6230bea68568b14ca101c96d187
DIFF: https://github.com/llvm/llvm-project/commit/2dff41c320fcf6230bea68568b14ca101c96d187.diff
LOG: [llvm][DebugInfo] Add IsDefault parameter to DIBuilder::createTemplateTemplateParameter
This is in preparation for Clang to emit `DW_AT_default_value`
for defaulted template template parameters.
Differential Revision: https://reviews.llvm.org/D139989
Added:
Modified:
llvm/include/llvm/IR/DIBuilder.h
llvm/lib/IR/DIBuilder.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/IR/DIBuilder.h b/llvm/include/llvm/IR/DIBuilder.h
index 2898d481c3c24..45b94044bc640 100644
--- a/llvm/include/llvm/IR/DIBuilder.h
+++ b/llvm/include/llvm/IR/DIBuilder.h
@@ -518,10 +518,10 @@ namespace llvm {
/// \param Name Value parameter name.
/// \param Ty Parameter type.
/// \param Val The fully qualified name of the template.
- DITemplateValueParameter *createTemplateTemplateParameter(DIScope *Scope,
- StringRef Name,
- DIType *Ty,
- StringRef Val);
+ /// \param IsDefault Parameter is default or not.
+ DITemplateValueParameter *
+ createTemplateTemplateParameter(DIScope *Scope, StringRef Name, DIType *Ty,
+ StringRef Val, bool IsDefault = false);
/// Create debugging information for a template parameter pack.
/// \param Scope Scope in which this type is defined.
diff --git a/llvm/lib/IR/DIBuilder.cpp b/llvm/lib/IR/DIBuilder.cpp
index 5028f549ef12e..6c873c3c6644d 100644
--- a/llvm/lib/IR/DIBuilder.cpp
+++ b/llvm/lib/IR/DIBuilder.cpp
@@ -474,10 +474,11 @@ DIBuilder::createTemplateValueParameter(DIScope *Context, StringRef Name,
DITemplateValueParameter *
DIBuilder::createTemplateTemplateParameter(DIScope *Context, StringRef Name,
- DIType *Ty, StringRef Val) {
+ DIType *Ty, StringRef Val,
+ bool IsDefault) {
return createTemplateValueParameterHelper(
VMContext, dwarf::DW_TAG_GNU_template_template_param, Context, Name, Ty,
- false, MDString::get(VMContext, Val));
+ IsDefault, MDString::get(VMContext, Val));
}
DITemplateValueParameter *
More information about the llvm-commits
mailing list