diff options
Diffstat (limited to 'lldb/source')
-rw-r--r-- | lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Symbol/ClangASTContext.cpp | 6 |
3 files changed, 6 insertions, 4 deletions
diff --git a/lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp b/lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp index 6ab45de4433..986b0b785d8 100644 --- a/lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp +++ b/lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp @@ -1084,7 +1084,7 @@ void PdbAstBuilder::CreateFunctionParameters(PdbCompilandSymId func_id, CompilerType param_type_ct(&m_clang, qt.getAsOpaquePtr()); clang::ParmVarDecl *param = m_clang.CreateParameterDeclaration( &function_decl, param_name.str().c_str(), param_type_ct, - clang::SC_None); + clang::SC_None, true); lldbassert(m_uid_to_decl.count(toOpaqueUid(param_uid)) == 0); m_uid_to_decl[toOpaqueUid(param_uid)] = param; diff --git a/lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp b/lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp index 82cfcfbb040..4ab384e67e2 100644 --- a/lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp +++ b/lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp @@ -940,7 +940,7 @@ PDBASTParser::GetDeclForSymbol(const llvm::pdb::PDBSymbol &symbol) { clang::ParmVarDecl *param = m_ast.CreateParameterDeclaration( decl, nullptr, arg_type->GetForwardCompilerType(), - clang::SC_None); + clang::SC_None, true); if (param) params.push_back(param); } diff --git a/lldb/source/Symbol/ClangASTContext.cpp b/lldb/source/Symbol/ClangASTContext.cpp index b348ba7508d..7c571002d58 100644 --- a/lldb/source/Symbol/ClangASTContext.cpp +++ b/lldb/source/Symbol/ClangASTContext.cpp @@ -2227,7 +2227,7 @@ CompilerType ClangASTContext::CreateFunctionType( ParmVarDecl *ClangASTContext::CreateParameterDeclaration( clang::DeclContext *decl_ctx, const char *name, - const CompilerType ¶m_type, int storage) { + const CompilerType ¶m_type, int storage, bool add_decl) { ASTContext *ast = getASTContext(); assert(ast != nullptr); auto *decl = @@ -2235,7 +2235,9 @@ ParmVarDecl *ClangASTContext::CreateParameterDeclaration( name && name[0] ? &ast->Idents.get(name) : nullptr, ClangUtil::GetQualType(param_type), nullptr, (clang::StorageClass)storage, nullptr); - decl_ctx->addDecl(decl); + if (add_decl) + decl_ctx->addDecl(decl); + return decl; } |