From: Nathan Lanza Date: Wed, 27 Mar 2019 19:15:13 +0000 (+0000) Subject: Kill unused variable m_tu_decl_up in SymbolFilePDB X-Git-Tag: llvmorg-10-init~9043 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1a0a24f1104af4a4b4df80ab729ff3640a44eb70;p=platform%2Fupstream%2Fllvm.git Kill unused variable m_tu_decl_up in SymbolFilePDB Summary: An TranslationUnitDecl was being brought in from the clang::ASTContext which required clang specific code to exist in SymbolFilePDB. Since it was unused we can just get rid of it along with the clang specific code. Reviewers: rnk, zturner, compnerd Reviewed By: compnerd Subscribers: jdoerfert Differential Revision: https://reviews.llvm.org/D59804 llvm-svn: 357113 --- diff --git a/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp b/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp index aa831f0..17dfcda 100644 --- a/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp +++ b/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp @@ -124,7 +124,7 @@ SymbolFilePDB::CreateInstance(lldb_private::ObjectFile *obj_file) { SymbolFilePDB::SymbolFilePDB(lldb_private::ObjectFile *object_file) : SymbolFile(object_file), m_session_up(), m_global_scope_up(), - m_cached_compile_unit_count(0), m_tu_decl_ctx_up() {} + m_cached_compile_unit_count(0) {} SymbolFilePDB::~SymbolFilePDB() {} @@ -189,14 +189,6 @@ void SymbolFilePDB::InitializeObject() { if (!m_global_scope_up) m_global_scope_up = m_session_up->getGlobalScope(); lldbassert(m_global_scope_up.get()); - - TypeSystem *type_system = - GetTypeSystemForLanguage(lldb::eLanguageTypeC_plus_plus); - ClangASTContext *clang_type_system = - llvm::dyn_cast_or_null(type_system); - lldbassert(clang_type_system); - m_tu_decl_ctx_up = llvm::make_unique( - type_system, clang_type_system->GetTranslationUnitDecl()); } uint32_t SymbolFilePDB::GetNumCompileUnits() { diff --git a/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h b/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h index 72713aa..853624e 100644 --- a/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h +++ b/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h @@ -252,7 +252,6 @@ private: std::unique_ptr m_session_up; std::unique_ptr m_global_scope_up; uint32_t m_cached_compile_unit_count; - std::unique_ptr m_tu_decl_ctx_up; lldb_private::UniqueCStringMap m_func_full_names; lldb_private::UniqueCStringMap m_func_base_names;