[Lldb-commits] [lldb] r373334 - [lldb][NFC] Remove unused ClangASTContext functions for checking/removing the ExternalASTSource

Raphael Isemann via lldb-commits lldb-commits at lists.llvm.org
Tue Oct 1 06:05:57 PDT 2019


Author: teemperor
Date: Tue Oct  1 06:05:57 2019
New Revision: 373334

URL: http://llvm.org/viewvc/llvm-project?rev=373334&view=rev
Log:
[lldb][NFC] Remove unused ClangASTContext functions for checking/removing the ExternalASTSource

Modified:
    lldb/trunk/include/lldb/Symbol/ClangASTContext.h
    lldb/trunk/source/Symbol/ClangASTContext.cpp

Modified: lldb/trunk/include/lldb/Symbol/ClangASTContext.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/ClangASTContext.h?rev=373334&r1=373333&r2=373334&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/ClangASTContext.h (original)
+++ lldb/trunk/include/lldb/Symbol/ClangASTContext.h Tue Oct  1 06:05:57 2019
@@ -118,13 +118,9 @@ public:
 
   void SetArchitecture(const ArchSpec &arch);
 
-  bool HasExternalSource();
-
   void SetExternalSource(
       llvm::IntrusiveRefCntPtr<clang::ExternalASTSource> &ast_source_up);
 
-  void RemoveExternalSource();
-
   bool GetCompleteDecl(clang::Decl *decl) {
     return ClangASTContext::GetCompleteDecl(getASTContext(), decl);
   }

Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=373334&r1=373333&r2=373334&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Tue Oct  1 06:05:57 2019
@@ -688,13 +688,6 @@ void ClangASTContext::SetArchitecture(co
   SetTargetTriple(arch.GetTriple().str());
 }
 
-bool ClangASTContext::HasExternalSource() {
-  ASTContext *ast = getASTContext();
-  if (ast)
-    return ast->getExternalSource() != nullptr;
-  return false;
-}
-
 void ClangASTContext::SetExternalSource(
     llvm::IntrusiveRefCntPtr<ExternalASTSource> &ast_source_up) {
   ASTContext *ast = getASTContext();
@@ -704,16 +697,6 @@ void ClangASTContext::SetExternalSource(
   }
 }
 
-void ClangASTContext::RemoveExternalSource() {
-  ASTContext *ast = getASTContext();
-
-  if (ast) {
-    llvm::IntrusiveRefCntPtr<ExternalASTSource> empty_ast_source_up;
-    ast->setExternalSource(empty_ast_source_up);
-    ast->getTranslationUnitDecl()->setHasExternalLexicalStorage(false);
-  }
-}
-
 ASTContext *ClangASTContext::getASTContext() {
   if (m_ast_up == nullptr) {
     m_ast_owned = true;




More information about the lldb-commits mailing list