[Lldb-commits] [lldb] 36f12d2 - [lldb][NFC] Delete unused ClangASTImporter::CompleteDecl

Raphael Isemann via lldb-commits lldb-commits at lists.llvm.org
Fri Jan 24 02:54:33 PST 2020


Author: Raphael Isemann
Date: 2020-01-24T11:54:12+01:00
New Revision: 36f12d2638f887c417bd1167a54e0e6f1bf3daca

URL: https://github.com/llvm/llvm-project/commit/36f12d2638f887c417bd1167a54e0e6f1bf3daca
DIFF: https://github.com/llvm/llvm-project/commit/36f12d2638f887c417bd1167a54e0e6f1bf3daca.diff

LOG: [lldb][NFC] Delete unused ClangASTImporter::CompleteDecl

Added: 
    

Modified: 
    lldb/include/lldb/Symbol/ClangASTImporter.h
    lldb/source/Symbol/ClangASTImporter.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/include/lldb/Symbol/ClangASTImporter.h b/lldb/include/lldb/Symbol/ClangASTImporter.h
index a4e042425dc6..bfdb929119cb 100644
--- a/lldb/include/lldb/Symbol/ClangASTImporter.h
+++ b/lldb/include/lldb/Symbol/ClangASTImporter.h
@@ -80,8 +80,6 @@ class ClangASTImporter {
 
   bool CompleteType(const CompilerType &compiler_type);
 
-  void CompleteDecl(clang::Decl *decl);
-
   bool CompleteTagDecl(clang::TagDecl *decl);
 
   bool CompleteTagDeclWithOrigin(clang::TagDecl *decl, clang::TagDecl *origin);

diff  --git a/lldb/source/Symbol/ClangASTImporter.cpp b/lldb/source/Symbol/ClangASTImporter.cpp
index 0e1ab1cad0c5..576a7d6f64b0 100644
--- a/lldb/source/Symbol/ClangASTImporter.cpp
+++ b/lldb/source/Symbol/ClangASTImporter.cpp
@@ -546,32 +546,6 @@ void ClangASTImporter::SetRecordLayout(clang::RecordDecl *decl,
   m_record_decl_to_layout_map.insert(std::make_pair(decl, layout));
 }
 
-void ClangASTImporter::CompleteDecl(clang::Decl *decl) {
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
-
-  LLDB_LOGF(log, "    [ClangASTImporter] CompleteDecl called on (%sDecl*)%p",
-            decl->getDeclKindName(), static_cast<void *>(decl));
-
-  if (ObjCInterfaceDecl *interface_decl = dyn_cast<ObjCInterfaceDecl>(decl)) {
-    if (!interface_decl->getDefinition()) {
-      interface_decl->startDefinition();
-      CompleteObjCInterfaceDecl(interface_decl);
-    }
-  } else if (ObjCProtocolDecl *protocol_decl =
-                 dyn_cast<ObjCProtocolDecl>(decl)) {
-    if (!protocol_decl->getDefinition())
-      protocol_decl->startDefinition();
-  } else if (TagDecl *tag_decl = dyn_cast<TagDecl>(decl)) {
-    if (!tag_decl->getDefinition() && !tag_decl->isBeingDefined()) {
-      tag_decl->startDefinition();
-      CompleteTagDecl(tag_decl);
-      tag_decl->setCompleteDefinition(true);
-    }
-  } else {
-    assert(0 && "CompleteDecl called on a Decl that can't be completed");
-  }
-}
-
 bool ClangASTImporter::CompleteTagDecl(clang::TagDecl *decl) {
   DeclOrigin decl_origin = GetDeclOrigin(decl);
 


        


More information about the lldb-commits mailing list