[llvm] r229037 - IR: Drop never-used defaults for DIBuilder::createTemplate*(), NFC
Duncan P. N. Exon Smith
dexonsmith at apple.com
Thu Feb 12 19:35:29 PST 2015
Author: dexonsmith
Date: Thu Feb 12 21:35:29 2015
New Revision: 229037
URL: http://llvm.org/viewvc/llvm-project?rev=229037&view=rev
Log:
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).
Modified:
llvm/trunk/include/llvm/IR/DIBuilder.h
llvm/trunk/lib/IR/DIBuilder.cpp
Modified: llvm/trunk/include/llvm/IR/DIBuilder.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/DIBuilder.h?rev=229037&r1=229036&r2=229037&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/DIBuilder.h (original)
+++ llvm/trunk/include/llvm/IR/DIBuilder.h Thu Feb 12 21:35:29 2015
@@ -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.
Modified: llvm/trunk/lib/IR/DIBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DIBuilder.cpp?rev=229037&r1=229036&r2=229037&view=diff
==============================================================================
--- llvm/trunk/lib/IR/DIBuilder.cpp (original)
+++ llvm/trunk/lib/IR/DIBuilder.cpp Thu Feb 12 21:35:29 2015
@@ -505,55 +505,50 @@ DIBuilder::createObjCProperty(StringRef
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,
More information about the llvm-commits
mailing list