[Lldb-commits] [lldb] 6e3f2de - Revert "[lldb][TypeSystemClang] Use the CXXFunctionPointerSummaryProvider for member-function pointers"

Michael Buch via lldb-commits lldb-commits at lists.llvm.org
Tue Mar 7 03:19:51 PST 2023


Author: Michael Buch
Date: 2023-03-07T11:18:38Z
New Revision: 6e3f2dedc8221571852323cf24f03c01ab5ca217

URL: https://github.com/llvm/llvm-project/commit/6e3f2dedc8221571852323cf24f03c01ab5ca217
DIFF: https://github.com/llvm/llvm-project/commit/6e3f2dedc8221571852323cf24f03c01ab5ca217.diff

LOG: Revert "[lldb][TypeSystemClang] Use the CXXFunctionPointerSummaryProvider for member-function pointers"

Reverted because Windows buildbot started failing

This reverts commit 6bd46e713c6d8deda7bdae8b1efadb99c88b4443.

Added: 
    

Modified: 
    lldb/include/lldb/Symbol/CompilerType.h
    lldb/include/lldb/Symbol/TypeSystem.h
    lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
    lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
    lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h
    lldb/source/Symbol/CompilerType.cpp
    lldb/test/API/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py

Removed: 
    


################################################################################
diff  --git a/lldb/include/lldb/Symbol/CompilerType.h b/lldb/include/lldb/Symbol/CompilerType.h
index 50587f4aab827..c96fc5a2b6886 100644
--- a/lldb/include/lldb/Symbol/CompilerType.h
+++ b/lldb/include/lldb/Symbol/CompilerType.h
@@ -164,8 +164,6 @@ class CompilerType {
 
   bool IsFunctionPointerType() const;
 
-  bool IsMemberFunctionPointerType() const;
-
   bool
   IsBlockPointerType(CompilerType *function_pointer_type_ptr = nullptr) const;
 

diff  --git a/lldb/include/lldb/Symbol/TypeSystem.h b/lldb/include/lldb/Symbol/TypeSystem.h
index 7681a700766a2..151a0ceaca72a 100644
--- a/lldb/include/lldb/Symbol/TypeSystem.h
+++ b/lldb/include/lldb/Symbol/TypeSystem.h
@@ -169,9 +169,6 @@ class TypeSystem : public PluginInterface,
 
   virtual bool IsFunctionPointerType(lldb::opaque_compiler_type_t type) = 0;
 
-  virtual bool
-  IsMemberFunctionPointerType(lldb::opaque_compiler_type_t type) = 0;
-
   virtual bool IsBlockPointerType(lldb::opaque_compiler_type_t type,
                                   CompilerType *function_pointer_type_ptr) = 0;
 

diff  --git a/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp b/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
index 0dfaa92ac99f4..1b152c16eac2a 100644
--- a/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
+++ b/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
@@ -1390,8 +1390,7 @@ CPlusPlusLanguage::GetHardcodedSummaries() {
                   TypeSummaryImpl::Flags(),
                   lldb_private::formatters::CXXFunctionPointerSummaryProvider,
                   "Function pointer summary provider"));
-          if (CompilerType CT = valobj.GetCompilerType();
-              CT.IsFunctionPointerType() || CT.IsMemberFunctionPointerType()) {
+          if (valobj.GetCompilerType().IsFunctionPointerType()) {
             return formatter_sp;
           }
           return nullptr;

diff  --git a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
index f26147e7d408e..fa1984b50a586 100644
--- a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
+++ b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
@@ -3194,15 +3194,6 @@ bool TypeSystemClang::IsTypeImpl(
   return false;
 }
 
-bool TypeSystemClang::IsMemberFunctionPointerType(
-    lldb::opaque_compiler_type_t type) {
-  auto isMemberFunctionPointerType = [](clang::QualType qual_type) {
-    return qual_type->isMemberFunctionPointerType();
-  };
-
-  return IsTypeImpl(type, isMemberFunctionPointerType);
-}
-
 bool TypeSystemClang::IsFunctionPointerType(lldb::opaque_compiler_type_t type) {
   auto isFunctionPointerType = [](clang::QualType qual_type) {
     return qual_type->isFunctionPointerType();

diff  --git a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h
index 99021f9b76bda..d5b0593cac8fb 100644
--- a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h
+++ b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h
@@ -656,8 +656,6 @@ class TypeSystemClang : public TypeSystem {
 
   bool IsFunctionPointerType(lldb::opaque_compiler_type_t type) override;
 
-  bool IsMemberFunctionPointerType(lldb::opaque_compiler_type_t type) override;
-
   bool IsBlockPointerType(lldb::opaque_compiler_type_t type,
                           CompilerType *function_pointer_type_ptr) override;
 

diff  --git a/lldb/source/Symbol/CompilerType.cpp b/lldb/source/Symbol/CompilerType.cpp
index d6dc43c05d1bd..11a7d09680d3f 100644
--- a/lldb/source/Symbol/CompilerType.cpp
+++ b/lldb/source/Symbol/CompilerType.cpp
@@ -154,13 +154,6 @@ bool CompilerType::IsFunctionPointerType() const {
   return false;
 }
 
-bool CompilerType::IsMemberFunctionPointerType() const {
-  if (IsValid())
-    if (auto type_system_sp = GetTypeSystem())
-      return type_system_sp->IsMemberFunctionPointerType(m_type);
-  return false;
-}
-
 bool CompilerType::IsBlockPointerType(
     CompilerType *function_pointer_type_ptr) const {
   if (IsValid())

diff  --git a/lldb/test/API/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py b/lldb/test/API/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py
index 2085025629bec..fb79d1463e5e1 100644
--- a/lldb/test/API/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py
+++ b/lldb/test/API/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py
@@ -292,9 +292,7 @@ def cleanup():
             substrs=['member_ptr = 0x'])
         self.expect(
             "frame variable member_func_ptr",
-            substrs=['member_func_ptr = 0x',
-                     '(a.out`IUseCharStar::member_func(int) at main.cpp:61)'])
+            substrs=['member_func_ptr = 0x'])
         self.expect(
             "frame variable ref_to_member_func_ptr",
-            substrs=['ref_to_member_func_ptr = 0x',
-                     '(a.out`IUseCharStar::member_func(int) at main.cpp:61)'])
+            substrs=['ref_to_member_func_ptr = 0x'])


        


More information about the lldb-commits mailing list