[Lldb-commits] [lldb] r368345 - SymbolFileDWARF: Unconditionally scan through clang modules. NFCish
Adrian Prantl via lldb-commits
lldb-commits at lists.llvm.org
Thu Aug 8 14:16:01 PDT 2019
Author: adrian
Date: Thu Aug 8 14:16:01 2019
New Revision: 368345
URL: http://llvm.org/viewvc/llvm-project?rev=368345&view=rev
Log:
SymbolFileDWARF: Unconditionally scan through clang modules. NFCish
When looking up a type by name, also scan through any referenced Clang
modules regardsless of whether a type with this name has been
found. This is NFCish (= a potential performance regression) for Clang
projects, but necessary in mixed Swift and Objective-C projects (and
tested in swift-lldb).
This only affects projects compiled with -gmodules that were not run
through dsymutil.
Modified:
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=368345&r1=368344&r2=368345&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Thu Aug 8 14:16:01 2019
@@ -2431,8 +2431,12 @@ uint32_t SymbolFileDWARF::FindTypes(
name.GetCString(), append, max_matches, num_matches);
}
}
- return num_matches;
- } else {
+ }
+
+ // Next search through the reachable Clang modules. This only applies for
+ // DWARF objects compiled with -gmodules that haven't been processed by
+ // dsymutil.
+ if (num_die_matches < max_matches) {
UpdateExternalModuleListIfNeeded();
for (const auto &pair : m_external_type_modules) {
@@ -2450,7 +2454,7 @@ uint32_t SymbolFileDWARF::FindTypes(
}
}
- return 0;
+ return num_die_matches;
}
size_t SymbolFileDWARF::FindTypes(const std::vector<CompilerContext> &context,
More information about the lldb-commits
mailing list