Skip to content

Commit 4bd87eb

Browse files
committed
[lldb][ClangASTImporter][NFCI] Implement CompleteTagDeclWithOrigin in terms of CompleteTagDecl
1 parent 9a44bbf commit 4bd87eb

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

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

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -815,21 +815,8 @@ bool ClangASTImporter::CompleteTagDecl(clang::TagDecl *decl) {
815815

816816
bool ClangASTImporter::CompleteTagDeclWithOrigin(clang::TagDecl *decl,
817817
clang::TagDecl *origin_decl) {
818-
clang::ASTContext *origin_ast_ctx = &origin_decl->getASTContext();
819-
820-
if (!TypeSystemClang::GetCompleteDecl(origin_ast_ctx, origin_decl))
821-
return false;
822-
823-
ImporterDelegateSP delegate_sp(
824-
GetDelegate(&decl->getASTContext(), origin_ast_ctx));
825-
826-
if (delegate_sp)
827-
delegate_sp->ImportDefinitionTo(decl, origin_decl);
828-
829-
ASTContextMetadataSP context_md = GetContextMetadata(&decl->getASTContext());
830-
831-
context_md->setOrigin(decl, DeclOrigin(origin_ast_ctx, origin_decl));
832-
return true;
818+
SetDeclOrigin(decl, origin_decl);
819+
return CompleteTagDecl(decl);
833820
}
834821

835822
bool ClangASTImporter::CompleteObjCInterfaceDecl(

0 commit comments

Comments
 (0)