forked from OSchip/llvm-project
[lldb][NFC] Use ArrayRef in TypeSystemClang::SetFunctionParameters
The implementation converts the pointer/size pair anyway back to ArrayRef.
This commit is contained in:
parent
ed1f149b54
commit
7177c5951a
|
@ -1270,13 +1270,10 @@ TypeSP DWARFASTParserClang::ParseSubroutine(const DWARFDIE &die,
|
||||||
LinkDeclContextToDIE(function_decl, die);
|
LinkDeclContextToDIE(function_decl, die);
|
||||||
|
|
||||||
if (!function_param_decls.empty()) {
|
if (!function_param_decls.empty()) {
|
||||||
m_ast.SetFunctionParameters(function_decl,
|
m_ast.SetFunctionParameters(function_decl, function_param_decls);
|
||||||
&function_param_decls.front(),
|
|
||||||
function_param_decls.size());
|
|
||||||
if (template_function_decl)
|
if (template_function_decl)
|
||||||
m_ast.SetFunctionParameters(template_function_decl,
|
m_ast.SetFunctionParameters(template_function_decl,
|
||||||
&function_param_decls.front(),
|
function_param_decls);
|
||||||
function_param_decls.size());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ClangASTMetadata metadata;
|
ClangASTMetadata metadata;
|
||||||
|
|
|
@ -1093,7 +1093,7 @@ void PdbAstBuilder::CreateFunctionParameters(PdbCompilandSymId func_id,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!params.empty())
|
if (!params.empty())
|
||||||
m_clang.SetFunctionParameters(&function_decl, params.data(), params.size());
|
m_clang.SetFunctionParameters(&function_decl, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
clang::QualType PdbAstBuilder::CreateEnumType(PdbTypeSymId id,
|
clang::QualType PdbAstBuilder::CreateEnumType(PdbTypeSymId id,
|
||||||
|
|
|
@ -970,7 +970,7 @@ PDBASTParser::GetDeclForSymbol(const llvm::pdb::PDBSymbol &symbol) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (params.size())
|
if (params.size())
|
||||||
m_ast.SetFunctionParameters(decl, params.data(), params.size());
|
m_ast.SetFunctionParameters(decl, params);
|
||||||
|
|
||||||
m_uid_to_decl[sym_id] = decl;
|
m_uid_to_decl[sym_id] = decl;
|
||||||
|
|
||||||
|
|
|
@ -2220,11 +2220,10 @@ ParmVarDecl *TypeSystemClang::CreateParameterDeclaration(
|
||||||
return decl;
|
return decl;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TypeSystemClang::SetFunctionParameters(FunctionDecl *function_decl,
|
void TypeSystemClang::SetFunctionParameters(
|
||||||
ParmVarDecl **params,
|
FunctionDecl *function_decl, llvm::ArrayRef<ParmVarDecl *> params) {
|
||||||
unsigned num_params) {
|
|
||||||
if (function_decl)
|
if (function_decl)
|
||||||
function_decl->setParams(ArrayRef<ParmVarDecl *>(params, num_params));
|
function_decl->setParams(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
CompilerType
|
CompilerType
|
||||||
|
|
|
@ -423,7 +423,7 @@ public:
|
||||||
int storage, bool add_decl = false);
|
int storage, bool add_decl = false);
|
||||||
|
|
||||||
void SetFunctionParameters(clang::FunctionDecl *function_decl,
|
void SetFunctionParameters(clang::FunctionDecl *function_decl,
|
||||||
clang::ParmVarDecl **params, unsigned num_params);
|
llvm::ArrayRef<clang::ParmVarDecl *> params);
|
||||||
|
|
||||||
CompilerType CreateBlockPointerType(const CompilerType &function_type);
|
CompilerType CreateBlockPointerType(const CompilerType &function_type);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue