[Lldb-commits] [lldb] 218601a - [lldb] Remove unused CompilerDeclContext::IsStructUnionOrClass

Raphael Isemann via lldb-commits lldb-commits at lists.llvm.org
Sun Dec 22 05:02:15 PST 2019


Author: Raphael Isemann
Date: 2019-12-22T14:01:37+01:00
New Revision: 218601ada1496f920fadddae9a21f7d6ccf48da5

URL: https://github.com/llvm/llvm-project/commit/218601ada1496f920fadddae9a21f7d6ccf48da5
DIFF: https://github.com/llvm/llvm-project/commit/218601ada1496f920fadddae9a21f7d6ccf48da5.diff

LOG: [lldb] Remove unused CompilerDeclContext::IsStructUnionOrClass

Added: 
    

Modified: 
    lldb/include/lldb/Symbol/ClangASTContext.h
    lldb/include/lldb/Symbol/CompilerDeclContext.h
    lldb/include/lldb/Symbol/TypeSystem.h
    lldb/source/Symbol/ClangASTContext.cpp
    lldb/source/Symbol/CompilerDeclContext.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/include/lldb/Symbol/ClangASTContext.h b/lldb/include/lldb/Symbol/ClangASTContext.h
index e0216cce3e10..b0b77305430d 100644
--- a/lldb/include/lldb/Symbol/ClangASTContext.h
+++ b/lldb/include/lldb/Symbol/ClangASTContext.h
@@ -444,8 +444,6 @@ class ClangASTContext : public TypeSystem {
   DeclContextFindDeclByName(void *opaque_decl_ctx, ConstString name,
                             const bool ignore_using_decls) override;
 
-  bool DeclContextIsStructUnionOrClass(void *opaque_decl_ctx) override;
-
   ConstString DeclContextGetName(void *opaque_decl_ctx) override;
 
   ConstString DeclContextGetScopeQualifiedName(void *opaque_decl_ctx) override;

diff  --git a/lldb/include/lldb/Symbol/CompilerDeclContext.h b/lldb/include/lldb/Symbol/CompilerDeclContext.h
index fe8539ab30e6..d7785ada0ba2 100644
--- a/lldb/include/lldb/Symbol/CompilerDeclContext.h
+++ b/lldb/include/lldb/Symbol/CompilerDeclContext.h
@@ -98,8 +98,6 @@ class CompilerDeclContext {
 
   ConstString GetScopeQualifiedName() const;
 
-  bool IsStructUnionOrClass() const;
-
 private:
   TypeSystem *m_type_system = nullptr;
   void *m_opaque_decl_ctx = nullptr;

diff  --git a/lldb/include/lldb/Symbol/TypeSystem.h b/lldb/include/lldb/Symbol/TypeSystem.h
index 5143a53674ab..706831f7ee98 100644
--- a/lldb/include/lldb/Symbol/TypeSystem.h
+++ b/lldb/include/lldb/Symbol/TypeSystem.h
@@ -98,8 +98,6 @@ class TypeSystem : public PluginInterface {
   DeclContextFindDeclByName(void *opaque_decl_ctx, ConstString name,
                             const bool ignore_imported_decls);
 
-  virtual bool DeclContextIsStructUnionOrClass(void *opaque_decl_ctx) = 0;
-
   virtual ConstString DeclContextGetName(void *opaque_decl_ctx) = 0;
 
   virtual ConstString

diff  --git a/lldb/source/Symbol/ClangASTContext.cpp b/lldb/source/Symbol/ClangASTContext.cpp
index 66a682c34937..0b723cee803f 100644
--- a/lldb/source/Symbol/ClangASTContext.cpp
+++ b/lldb/source/Symbol/ClangASTContext.cpp
@@ -9268,13 +9268,6 @@ uint32_t ClangASTContext::CountDeclLevels(clang::DeclContext *frame_decl_ctx,
   return LLDB_INVALID_DECL_LEVEL;
 }
 
-bool ClangASTContext::DeclContextIsStructUnionOrClass(void *opaque_decl_ctx) {
-  if (opaque_decl_ctx)
-    return ((clang::DeclContext *)opaque_decl_ctx)->isRecord();
-  else
-    return false;
-}
-
 ConstString ClangASTContext::DeclContextGetName(void *opaque_decl_ctx) {
   if (opaque_decl_ctx) {
     clang::NamedDecl *named_decl =

diff  --git a/lldb/source/Symbol/CompilerDeclContext.cpp b/lldb/source/Symbol/CompilerDeclContext.cpp
index 672de6ec34d1..25768fcb9f76 100644
--- a/lldb/source/Symbol/CompilerDeclContext.cpp
+++ b/lldb/source/Symbol/CompilerDeclContext.cpp
@@ -37,13 +37,6 @@ ConstString CompilerDeclContext::GetScopeQualifiedName() const {
     return ConstString();
 }
 
-bool CompilerDeclContext::IsStructUnionOrClass() const {
-  if (IsValid())
-    return m_type_system->DeclContextIsStructUnionOrClass(m_opaque_decl_ctx);
-  else
-    return false;
-}
-
 bool CompilerDeclContext::IsClassMethod(lldb::LanguageType *language_ptr,
                                         bool *is_instance_method_ptr,
                                         ConstString *language_object_name_ptr) {


        


More information about the lldb-commits mailing list