Skip to content

Commit 9c3f1f4

Browse files
committed
[lldb][ClangASTImporter][NFC] Remove redundant calls to ASTImporter::Imported
The ASTImporter::Imported base method has been made a no-op in 26f72a9. So all calls to it from a base-class are now redundant. The API is now only used to notify subclasses that an import occurred and not for any other bookkeeping (which is done in MapImported which we call properly). Differential Revision: https://reviews.llvm.org/D158172
1 parent e69916c commit 9c3f1f4

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

lldb/source/Plugins/ExpressionParser/Clang/ClangASTImporter.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,6 @@ void ClangASTImporter::ASTImporterDelegate::ImportDefinitionTo(
902902
// We want that 'to' is actually complete after this function so let's
903903
// tell the ASTImporter that 'to' was imported from 'from'.
904904
MapImported(from, to);
905-
ASTImporter::Imported(from, to);
906905

907906
Log *log = GetLog(LLDBLog::Expressions);
908907

@@ -1028,7 +1027,7 @@ void ClangASTImporter::ASTImporterDelegate::Imported(clang::Decl *from,
10281027
// Some decls shouldn't be tracked here because they were not created by
10291028
// copying 'from' to 'to'. Just exit early for those.
10301029
if (m_decls_to_ignore.count(to))
1031-
return clang::ASTImporter::Imported(from, to);
1030+
return;
10321031

10331032
// Transfer module ownership information.
10341033
auto *from_source = llvm::dyn_cast_or_null<ClangExternalASTSourceCallbacks>(
@@ -1081,12 +1080,6 @@ void ClangASTImporter::ASTImporterDelegate::Imported(clang::Decl *from,
10811080
if (!to_context_md->hasOrigin(to) || user_id != LLDB_INVALID_UID)
10821081
to_context_md->setOrigin(to, origin);
10831082

1084-
ImporterDelegateSP direct_completer =
1085-
m_main.GetDelegate(&to->getASTContext(), origin.ctx);
1086-
1087-
if (direct_completer.get() != this)
1088-
direct_completer->ASTImporter::Imported(origin.decl, to);
1089-
10901083
LLDB_LOG(log,
10911084
" [ClangASTImporter] Propagated origin "
10921085
"(Decl*){0}/(ASTContext*){1} from (ASTContext*){2} to "

0 commit comments

Comments
 (0)