[Lldb-commits] [lldb] 6f3778d - [lldb][NFC] std::set -> DenseSet in ClangModulesDeclVendor
Raphael Isemann via lldb-commits
lldb-commits at lists.llvm.org
Mon Mar 8 04:13:59 PST 2021
Author: Raphael Isemann
Date: 2021-03-08T13:13:35+01:00
New Revision: 6f3778d31a9accdcb5a910506d3ff6debf7b92bc
URL: https://github.com/llvm/llvm-project/commit/6f3778d31a9accdcb5a910506d3ff6debf7b92bc
DIFF: https://github.com/llvm/llvm-project/commit/6f3778d31a9accdcb5a910506d3ff6debf7b92bc.diff
LOG: [lldb][NFC] std::set -> DenseSet in ClangModulesDeclVendor
ModuleID is just an integer so let's use a DenseSet.
Added:
Modified:
lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
Removed:
################################################################################
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
index c014ad504d37..86582a7b9f08 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
@@ -100,9 +100,9 @@ class ClangModulesDeclVendorImpl : public ClangModulesDeclVendor {
std::function<bool(llvm::StringRef, llvm::StringRef)> handler) override;
private:
- void
- ReportModuleExportsHelper(std::set<ClangModulesDeclVendor::ModuleID> &exports,
- clang::Module *module);
+ typedef llvm::DenseSet<ModuleID> ExportedModuleSet;
+ void ReportModuleExportsHelper(ExportedModuleSet &exports,
+ clang::Module *module);
void ReportModuleExports(ModuleVector &exports, clang::Module *module);
@@ -120,7 +120,7 @@ class ClangModulesDeclVendorImpl : public ClangModulesDeclVendor {
typedef std::vector<ConstString> ImportedModule;
typedef std::map<ImportedModule, clang::Module *> ImportedModuleMap;
- typedef std::set<ModuleID> ImportedModuleSet;
+ typedef llvm::DenseSet<ModuleID> ImportedModuleSet;
ImportedModuleMap m_imported_modules;
ImportedModuleSet m_user_imported_modules;
// We assume that every ASTContext has an TypeSystemClang, so we also store
@@ -195,8 +195,7 @@ ClangModulesDeclVendorImpl::ClangModulesDeclVendorImpl(
}
void ClangModulesDeclVendorImpl::ReportModuleExportsHelper(
- std::set<ClangModulesDeclVendor::ModuleID> &exports,
- clang::Module *module) {
+ ExportedModuleSet &exports, clang::Module *module) {
if (exports.count(reinterpret_cast<ClangModulesDeclVendor::ModuleID>(module)))
return;
@@ -213,7 +212,7 @@ void ClangModulesDeclVendorImpl::ReportModuleExportsHelper(
void ClangModulesDeclVendorImpl::ReportModuleExports(
ClangModulesDeclVendor::ModuleVector &exports, clang::Module *module) {
- std::set<ClangModulesDeclVendor::ModuleID> exports_set;
+ ExportedModuleSet exports_set;
ReportModuleExportsHelper(exports_set, module);
More information about the lldb-commits
mailing list