diff options
author | Raphael Isemann <teemperor@gmail.com> | 2019-03-12 07:45:04 +0000 |
---|---|---|
committer | Raphael Isemann <teemperor@gmail.com> | 2019-03-12 07:45:04 +0000 |
commit | a946997c2482e4386549ee38b4bb154eb58efbb6 (patch) | |
tree | 7bd1deaa1c10da160f6a650e3ca1047edec755d1 /lldb/source/Plugins | |
parent | 21347b29013b6b6a97d1d800add7c5b54a657fb7 (diff) | |
download | bcm5719-llvm-a946997c2482e4386549ee38b4bb154eb58efbb6.tar.gz bcm5719-llvm-a946997c2482e4386549ee38b4bb154eb58efbb6.zip |
Correctly look up declarations in inline namespaces
Summary:
This patch marks the inline namespaces from DWARF as inline and also ensures that looking
up declarations now follows the lookup rules for inline namespaces.
Reviewers: aprantl, shafik, serge-sans-paille
Reviewed By: aprantl
Subscribers: eraman, jdoerfert, lldb-commits
Tags: #c_modules_in_lldb, #lldb
Differential Revision: https://reviews.llvm.org/D59198
llvm-svn: 355897
Diffstat (limited to 'lldb/source/Plugins')
-rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp | 7 | ||||
-rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp index aa759c4533d..1d2398ccc0b 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp @@ -3798,8 +3798,11 @@ DWARFASTParserClang::ResolveNamespaceDIE(const DWARFDIE &die) { const char *namespace_name = die.GetName(); clang::DeclContext *containing_decl_ctx = GetClangDeclContextContainingDIE(die, nullptr); - namespace_decl = m_ast.GetUniqueNamespaceDeclaration(namespace_name, - containing_decl_ctx); + bool is_inline = + die.GetAttributeValueAsUnsigned(DW_AT_export_symbols, 0) != 0; + + namespace_decl = m_ast.GetUniqueNamespaceDeclaration( + namespace_name, containing_decl_ctx, is_inline); Log *log = nullptr; // (LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_INFO)); if (log) { diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp index 61c270fa2fa..0b789fd0c7c 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp @@ -2239,7 +2239,7 @@ bool SymbolFileDWARF::DIEInDeclContext(const CompilerDeclContext *decl_ctx, CompilerDeclContext actual_decl_ctx = dwarf_ast->GetDeclContextContainingUIDFromDWARF(die); if (actual_decl_ctx) - return actual_decl_ctx == *decl_ctx; + return decl_ctx->IsContainedInLookup(actual_decl_ctx); } } return false; |