IR: Drop never-used defaults for DIBuilder::createTemplate*(), NFC

No caller specifies anything different; these parameters are dead code
and probably always have been.  The new hierarchy doesn't bother with
the fields at all (see r228607 and r228652).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229037 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan P. N. Exon Smith 2015-02-13 03:35:29 +00:00
parent c8055a1f5e
commit 9db1298f42
2 changed files with 30 additions and 50 deletions

View File

@ -333,13 +333,8 @@ namespace llvm {
/// @param Scope Scope in which this type is defined.
/// @param Name Type parameter name.
/// @param Ty Parameter type.
/// @param File File where this type parameter is defined.
/// @param LineNo Line number.
/// @param ColumnNo Column Number.
DITemplateTypeParameter
createTemplateTypeParameter(DIDescriptor Scope, StringRef Name, DIType Ty,
MDNode *File = nullptr, unsigned LineNo = 0,
unsigned ColumnNo = 0);
createTemplateTypeParameter(DIDescriptor Scope, StringRef Name, DIType Ty);
/// createTemplateValueParameter - Create debugging information for template
/// value parameter.
@ -347,40 +342,30 @@ namespace llvm {
/// @param Name Value parameter name.
/// @param Ty Parameter type.
/// @param Val Constant parameter value.
/// @param File File where this type parameter is defined.
/// @param LineNo Line number.
/// @param ColumnNo Column Number.
DITemplateValueParameter
createTemplateValueParameter(DIDescriptor Scope, StringRef Name, DIType Ty,
Constant *Val, MDNode *File = nullptr,
unsigned LineNo = 0, unsigned ColumnNo = 0);
DITemplateValueParameter createTemplateValueParameter(DIDescriptor Scope,
StringRef Name,
DIType Ty,
Constant *Val);
/// \brief Create debugging information for a template template parameter.
/// @param Scope Scope in which this type is defined.
/// @param Name Value parameter name.
/// @param Ty Parameter type.
/// @param Val The fully qualified name of the template.
/// @param File File where this type parameter is defined.
/// @param LineNo Line number.
/// @param ColumnNo Column Number.
DITemplateValueParameter
createTemplateTemplateParameter(DIDescriptor Scope, StringRef Name,
DIType Ty, StringRef Val,
MDNode *File = nullptr, unsigned LineNo = 0,
unsigned ColumnNo = 0);
DITemplateValueParameter createTemplateTemplateParameter(DIDescriptor Scope,
StringRef Name,
DIType Ty,
StringRef Val);
/// \brief Create debugging information for a template parameter pack.
/// @param Scope Scope in which this type is defined.
/// @param Name Value parameter name.
/// @param Ty Parameter type.
/// @param Val An array of types in the pack.
/// @param File File where this type parameter is defined.
/// @param LineNo Line number.
/// @param ColumnNo Column Number.
DITemplateValueParameter
createTemplateParameterPack(DIDescriptor Scope, StringRef Name,
DIType Ty, DIArray Val, MDNode *File = nullptr,
unsigned LineNo = 0, unsigned ColumnNo = 0);
DITemplateValueParameter createTemplateParameterPack(DIDescriptor Scope,
StringRef Name,
DIType Ty,
DIArray Val);
/// createArrayType - Create debugging information entry for an array.
/// @param Size Array size.

View File

@ -505,55 +505,50 @@ DIBuilder::createObjCProperty(StringRef Name, DIFile File, unsigned LineNumber,
DITemplateTypeParameter
DIBuilder::createTemplateTypeParameter(DIDescriptor Context, StringRef Name,
DIType Ty, MDNode *File, unsigned LineNo,
unsigned ColumnNo) {
DIType Ty) {
Metadata *Elts[] = {HeaderBuilder::get(dwarf::DW_TAG_template_type_parameter)
.concat(Name)
.concat(LineNo)
.concat(ColumnNo)
.concat(0)
.concat(0)
.get(VMContext),
DIScope(getNonCompileUnitScope(Context)).getRef(),
Ty.getRef(), File};
Ty.getRef(), nullptr};
return DITemplateTypeParameter(MDNode::get(VMContext, Elts));
}
static DITemplateValueParameter createTemplateValueParameterHelper(
LLVMContext &VMContext, unsigned Tag, DIDescriptor Context, StringRef Name,
DIType Ty, Metadata *MD, MDNode *File, unsigned LineNo, unsigned ColumnNo) {
static DITemplateValueParameter
createTemplateValueParameterHelper(LLVMContext &VMContext, unsigned Tag,
DIDescriptor Context, StringRef Name,
DIType Ty, Metadata *MD) {
Metadata *Elts[] = {
HeaderBuilder::get(Tag).concat(Name).concat(LineNo).concat(ColumnNo).get(
VMContext),
DIScope(getNonCompileUnitScope(Context)).getRef(), Ty.getRef(), MD, File};
HeaderBuilder::get(Tag).concat(Name).concat(0).concat(0).get(VMContext),
DIScope(getNonCompileUnitScope(Context)).getRef(), Ty.getRef(), MD,
nullptr};
return DITemplateValueParameter(MDNode::get(VMContext, Elts));
}
DITemplateValueParameter
DIBuilder::createTemplateValueParameter(DIDescriptor Context, StringRef Name,
DIType Ty, Constant *Val, MDNode *File,
unsigned LineNo, unsigned ColumnNo) {
DIType Ty, Constant *Val) {
return createTemplateValueParameterHelper(
VMContext, dwarf::DW_TAG_template_value_parameter, Context, Name, Ty,
getConstantOrNull(Val), File, LineNo, ColumnNo);
getConstantOrNull(Val));
}
DITemplateValueParameter
DIBuilder::createTemplateTemplateParameter(DIDescriptor Context, StringRef Name,
DIType Ty, StringRef Val,
MDNode *File, unsigned LineNo,
unsigned ColumnNo) {
DIType Ty, StringRef Val) {
return createTemplateValueParameterHelper(
VMContext, dwarf::DW_TAG_GNU_template_template_param, Context, Name, Ty,
MDString::get(VMContext, Val), File, LineNo, ColumnNo);
MDString::get(VMContext, Val));
}
DITemplateValueParameter
DIBuilder::createTemplateParameterPack(DIDescriptor Context, StringRef Name,
DIType Ty, DIArray Val,
MDNode *File, unsigned LineNo,
unsigned ColumnNo) {
DIType Ty, DIArray Val) {
return createTemplateValueParameterHelper(
VMContext, dwarf::DW_TAG_GNU_template_parameter_pack, Context, Name, Ty,
Val, File, LineNo, ColumnNo);
Val);
}
DICompositeType DIBuilder::createClassType(DIDescriptor Context, StringRef Name,