[Lldb-commits] [lldb] 84c5702 - [lldb][NFC] Inclusive language: rename m_master in ASTImporterDelegate
Quinn Pham via lldb-commits
lldb-commits at lists.llvm.org
Fri Nov 12 10:04:23 PST 2021
Author: Quinn Pham
Date: 2021-11-12T12:04:14-06:00
New Revision: 84c5702b76497e6f3e3f2abc15fb59e947663b38
URL: https://github.com/llvm/llvm-project/commit/84c5702b76497e6f3e3f2abc15fb59e947663b38
DIFF: https://github.com/llvm/llvm-project/commit/84c5702b76497e6f3e3f2abc15fb59e947663b38.diff
LOG: [lldb][NFC] Inclusive language: rename m_master in ASTImporterDelegate
[NFC] As part of using inclusive language within the llvm project, this patch
replaces `m_master` in `ASTImporterDelegate` with `m_main`.
Reviewed By: teemperor, clayborg
Differential Revision: https://reviews.llvm.org/D113720
Added:
Modified:
lldb/source/Plugins/ExpressionParser/Clang/ClangASTImporter.cpp
lldb/source/Plugins/ExpressionParser/Clang/ClangASTImporter.h
Removed:
################################################################################
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangASTImporter.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangASTImporter.cpp
index 9ff6fbc28bf9c..80469e2925801 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangASTImporter.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangASTImporter.cpp
@@ -824,7 +824,7 @@ ClangASTImporter::ASTImporterDelegate::ImportImpl(Decl *From) {
}
// Check which ASTContext this declaration originally came from.
- DeclOrigin origin = m_master.GetDeclOrigin(From);
+ DeclOrigin origin = m_main.GetDeclOrigin(From);
// Prevent infinite recursion when the origin tracking contains a cycle.
assert(origin.decl != From && "Origin points to itself?");
@@ -853,7 +853,7 @@ ClangASTImporter::ASTImporterDelegate::ImportImpl(Decl *From) {
// though all these
diff erent source ASTContexts just got a copy from
// one source AST).
if (origin.Valid()) {
- auto R = m_master.CopyDecl(&getToContext(), origin.decl);
+ auto R = m_main.CopyDecl(&getToContext(), origin.decl);
if (R) {
RegisterImportedDecl(From, R);
return R;
@@ -862,7 +862,7 @@ ClangASTImporter::ASTImporterDelegate::ImportImpl(Decl *From) {
// If we have a forcefully completed type, try to find an actual definition
// for it in other modules.
- const ClangASTMetadata *md = m_master.GetDeclMetadata(From);
+ const ClangASTMetadata *md = m_main.GetDeclMetadata(From);
auto *td = dyn_cast<TagDecl>(From);
if (td && md && md->IsForcefullyCompleted()) {
Log *log = GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS);
@@ -1045,7 +1045,7 @@ void ClangASTImporter::ASTImporterDelegate::Imported(clang::Decl *from,
}
lldb::user_id_t user_id = LLDB_INVALID_UID;
- ClangASTMetadata *metadata = m_master.GetDeclMetadata(from);
+ ClangASTMetadata *metadata = m_main.GetDeclMetadata(from);
if (metadata)
user_id = metadata->GetUserID();
@@ -1069,9 +1069,9 @@ void ClangASTImporter::ASTImporterDelegate::Imported(clang::Decl *from,
}
ASTContextMetadataSP to_context_md =
- m_master.GetContextMetadata(&to->getASTContext());
+ m_main.GetContextMetadata(&to->getASTContext());
ASTContextMetadataSP from_context_md =
- m_master.MaybeGetContextMetadata(m_source_ctx);
+ m_main.MaybeGetContextMetadata(m_source_ctx);
if (from_context_md) {
DeclOrigin origin = from_context_md->getOrigin(from);
@@ -1082,7 +1082,7 @@ void ClangASTImporter::ASTImporterDelegate::Imported(clang::Decl *from,
to_context_md->setOrigin(to, origin);
ImporterDelegateSP direct_completer =
- m_master.GetDelegate(&to->getASTContext(), origin.ctx);
+ m_main.GetDelegate(&to->getASTContext(), origin.ctx);
if (direct_completer.get() != this)
direct_completer->ASTImporter::Imported(origin.decl, to);
@@ -1143,7 +1143,7 @@ void ClangASTImporter::ASTImporterDelegate::Imported(clang::Decl *from,
}
if (auto *to_namespace_decl = dyn_cast<NamespaceDecl>(to)) {
- m_master.BuildNamespaceMap(to_namespace_decl);
+ m_main.BuildNamespaceMap(to_namespace_decl);
to_namespace_decl->setHasExternalVisibleStorage();
}
@@ -1172,10 +1172,10 @@ void ClangASTImporter::ASTImporterDelegate::Imported(clang::Decl *from,
}
if (clang::CXXMethodDecl *to_method = dyn_cast<CXXMethodDecl>(to))
- MaybeCompleteReturnType(m_master, to_method);
+ MaybeCompleteReturnType(m_main, to_method);
}
clang::Decl *
ClangASTImporter::ASTImporterDelegate::GetOriginalDecl(clang::Decl *To) {
- return m_master.GetDeclOrigin(To).decl;
+ return m_main.GetDeclOrigin(To).decl;
}
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangASTImporter.h b/lldb/source/Plugins/ExpressionParser/Clang/ClangASTImporter.h
index 4f589d34aa48e..e565a96b217ff 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangASTImporter.h
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangASTImporter.h
@@ -259,11 +259,11 @@ class ClangASTImporter {
/// CxxModuleHandler to replace any missing or malformed declarations with
/// their counterpart from a C++ module.
struct ASTImporterDelegate : public clang::ASTImporter {
- ASTImporterDelegate(ClangASTImporter &master, clang::ASTContext *target_ctx,
+ ASTImporterDelegate(ClangASTImporter &main, clang::ASTContext *target_ctx,
clang::ASTContext *source_ctx)
- : clang::ASTImporter(*target_ctx, master.m_file_manager, *source_ctx,
- master.m_file_manager, true /*minimal*/),
- m_master(master), m_source_ctx(source_ctx) {
+ : clang::ASTImporter(*target_ctx, main.m_file_manager, *source_ctx,
+ main.m_file_manager, true /*minimal*/),
+ m_main(main), m_source_ctx(source_ctx) {
// Target and source ASTContext shouldn't be identical. Importing AST
// nodes within the same AST doesn't make any sense as the whole idea
// is to import them to a
diff erent AST.
@@ -329,7 +329,7 @@ class ClangASTImporter {
/// were created from the 'std' C++ module to prevent that the Importer
/// tries to sync them with the broken equivalent in the debug info AST.
llvm::SmallPtrSet<clang::Decl *, 16> m_decls_to_ignore;
- ClangASTImporter &m_master;
+ ClangASTImporter &m_main;
clang::ASTContext *m_source_ctx;
CxxModuleHandler *m_std_handler = nullptr;
/// The currently attached listener.
More information about the lldb-commits
mailing list