[Lldb-commits] [lldb] 7e6c437 - [lldb][NFC] Remove name parameter from CreateFunctionTemplateDecl
Raphael Isemann via lldb-commits
lldb-commits at lists.llvm.org
Mon Aug 17 04:44:35 PDT 2020
Author: Raphael Isemann
Date: 2020-08-17T13:44:10+02:00
New Revision: 7e6c437fb413eb7ae102e8db869bb55a748411ff
URL: https://github.com/llvm/llvm-project/commit/7e6c437fb413eb7ae102e8db869bb55a748411ff
DIFF: https://github.com/llvm/llvm-project/commit/7e6c437fb413eb7ae102e8db869bb55a748411ff.diff
LOG: [lldb][NFC] Remove name parameter from CreateFunctionTemplateDecl
It's unused and not documented.
Added:
Modified:
lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h
lldb/unittests/Symbol/TestTypeSystemClang.cpp
Removed:
################################################################################
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
index 1344523522d3..4b23ead1fe9e 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
@@ -1244,7 +1244,7 @@ TypeSP DWARFASTParserClang::ParseSubroutine(const DWARFDIE &die,
clang::FunctionTemplateDecl *func_template_decl =
m_ast.CreateFunctionTemplateDecl(
containing_decl_ctx, GetOwningClangModule(die),
- template_function_decl, name, template_param_infos);
+ template_function_decl, template_param_infos);
m_ast.CreateFunctionTemplateSpecializationInfo(
template_function_decl, func_template_decl, template_param_infos);
}
diff --git a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
index 23e052791e19..2ace212b6662 100644
--- a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
+++ b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
@@ -1419,7 +1419,7 @@ static TemplateParameterList *CreateTemplateParameterList(
clang::FunctionTemplateDecl *TypeSystemClang::CreateFunctionTemplateDecl(
clang::DeclContext *decl_ctx, OptionalClangModuleID owning_module,
- clang::FunctionDecl *func_decl, const char *name,
+ clang::FunctionDecl *func_decl,
const TemplateParameterInfos &template_param_infos) {
// /// Create a function template node.
ASTContext &ast = getASTContext();
diff --git a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h
index 32736ee2148f..4ae127161127 100644
--- a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h
+++ b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h
@@ -346,11 +346,9 @@ class TypeSystemClang : public TypeSystem {
std::unique_ptr<TemplateParameterInfos> packed_args;
};
- clang::FunctionTemplateDecl *
- CreateFunctionTemplateDecl(clang::DeclContext *decl_ctx,
- OptionalClangModuleID owning_module,
- clang::FunctionDecl *func_decl, const char *name,
- const TemplateParameterInfos &infos);
+ clang::FunctionTemplateDecl *CreateFunctionTemplateDecl(
+ clang::DeclContext *decl_ctx, OptionalClangModuleID owning_module,
+ clang::FunctionDecl *func_decl, const TemplateParameterInfos &infos);
void CreateFunctionTemplateSpecializationInfo(
clang::FunctionDecl *func_decl, clang::FunctionTemplateDecl *Template,
diff --git a/lldb/unittests/Symbol/TestTypeSystemClang.cpp b/lldb/unittests/Symbol/TestTypeSystemClang.cpp
index f43b4f5dc0df..3303a45d756e 100644
--- a/lldb/unittests/Symbol/TestTypeSystemClang.cpp
+++ b/lldb/unittests/Symbol/TestTypeSystemClang.cpp
@@ -566,7 +566,7 @@ TEST_F(TestTypeSystemClang, TestFunctionTemplateConstruction) {
// Create the actual function template.
clang::FunctionTemplateDecl *func_template =
m_ast->CreateFunctionTemplateDecl(TU, OptionalClangModuleID(), func,
- "foo", empty_params);
+ empty_params);
EXPECT_EQ(TU, func_template->getDeclContext());
EXPECT_EQ("foo", func_template->getName());
@@ -598,7 +598,7 @@ TEST_F(TestTypeSystemClang, TestFunctionTemplateInRecordConstruction) {
// Create the actual function template.
clang::FunctionTemplateDecl *func_template =
m_ast->CreateFunctionTemplateDecl(record, OptionalClangModuleID(), func,
- "foo", empty_params);
+ empty_params);
EXPECT_EQ(record, func_template->getDeclContext());
EXPECT_EQ("foo", func_template->getName());
More information about the lldb-commits
mailing list