diff --git a/lldb/include/lldb/Core/RichManglingContext.h b/lldb/include/lldb/Core/RichManglingContext.h index 48102ec0b1cf88..a6b7af8d8d7ec1 100644 --- a/lldb/include/lldb/Core/RichManglingContext.h +++ b/lldb/include/lldb/Core/RichManglingContext.h @@ -42,9 +42,6 @@ class RichManglingContext { /// If this symbol describes a constructor or destructor. bool IsCtorOrDtor() const; - /// If this symbol describes a function. - bool IsFunction() const; - /// Get the base name of a function. This doesn't include trailing template /// arguments, ie "a::b" gives "b". The result will overwrite the /// internal buffer. It can be obtained via GetBufferRef(). diff --git a/lldb/source/Core/RichManglingContext.cpp b/lldb/source/Core/RichManglingContext.cpp index 2dcb1407e6c745..63170feb6231cb 100644 --- a/lldb/source/Core/RichManglingContext.cpp +++ b/lldb/source/Core/RichManglingContext.cpp @@ -83,19 +83,6 @@ bool RichManglingContext::IsCtorOrDtor() const { llvm_unreachable("Fully covered switch above!"); } -bool RichManglingContext::IsFunction() const { - assert(m_provider != None && "Initialize a provider first"); - switch (m_provider) { - case ItaniumPartialDemangler: - return m_ipd.isFunction(); - case PluginCxxLanguage: - return get(m_cxx_method_parser)->IsValid(); - case None: - return false; - } - llvm_unreachable("Fully covered switch above!"); -} - void RichManglingContext::processIPDStrResult(char *ipd_res, size_t res_size) { // Error case: Clear the buffer. if (LLVM_UNLIKELY(ipd_res == nullptr)) { diff --git a/lldb/unittests/Core/RichManglingContextTest.cpp b/lldb/unittests/Core/RichManglingContextTest.cpp index f8a0bbf9102b51..89e9ef03650f9f 100644 --- a/lldb/unittests/Core/RichManglingContextTest.cpp +++ b/lldb/unittests/Core/RichManglingContextTest.cpp @@ -20,7 +20,6 @@ TEST(RichManglingContextTest, Basic) { ConstString mangled("_ZN3foo3barEv"); EXPECT_TRUE(RMC.FromItaniumName(mangled)); - EXPECT_TRUE(RMC.IsFunction()); EXPECT_FALSE(RMC.IsCtorOrDtor()); RMC.ParseFunctionDeclContextName(); @@ -42,7 +41,6 @@ TEST(RichManglingContextTest, FromCxxMethodName) { ConstString demangled("foo::bar()"); EXPECT_TRUE(CxxMethodRMC.FromCxxMethodName(demangled)); - EXPECT_TRUE(ItaniumRMC.IsFunction() == CxxMethodRMC.IsFunction()); EXPECT_TRUE(ItaniumRMC.IsCtorOrDtor() == CxxMethodRMC.IsCtorOrDtor()); ItaniumRMC.ParseFunctionDeclContextName(); @@ -61,9 +59,6 @@ TEST(RichManglingContextTest, FromCxxMethodName) { { RichManglingContext CxxMethodRMC; EXPECT_TRUE(CxxMethodRMC.FromCxxMethodName(ConstString("X"))); - - // We expect it is not a function. - EXPECT_FALSE(CxxMethodRMC.IsFunction()); } // Construct with a function without a context. @@ -72,9 +67,6 @@ TEST(RichManglingContextTest, FromCxxMethodName) { EXPECT_TRUE(CxxMethodRMC.FromCxxMethodName( ConstString("void * operator new(unsigned __int64)"))); - // We expect it is a function. - EXPECT_TRUE(CxxMethodRMC.IsFunction()); - // We expect its context is empty. CxxMethodRMC.ParseFunctionDeclContextName(); EXPECT_TRUE(CxxMethodRMC.GetBufferRef().empty());