[Lldb-commits] [lldb] 29b9bdf - [lldb] Remove HasCallbackParameter (#150366)
via lldb-commits
lldb-commits at lists.llvm.org
Thu Jul 24 09:39:32 PDT 2025
Author: Kazu Hirata
Date: 2025-07-24T09:39:28-07:00
New Revision: 29b9bdf81eba6d0445b0fb84ed42e289cd0940eb
URL: https://github.com/llvm/llvm-project/commit/29b9bdf81eba6d0445b0fb84ed42e289cd0940eb
DIFF: https://github.com/llvm/llvm-project/commit/29b9bdf81eba6d0445b0fb84ed42e289cd0940eb.diff
LOG: [lldb] Remove HasCallbackParameter (#150366)
Added:
Modified:
lldb/tools/lldb-rpc-gen/RPCCommon.cpp
lldb/tools/lldb-rpc-gen/RPCCommon.h
Removed:
################################################################################
diff --git a/lldb/tools/lldb-rpc-gen/RPCCommon.cpp b/lldb/tools/lldb-rpc-gen/RPCCommon.cpp
index 6f0abe4b1ae87..7af6ee37f248b 100644
--- a/lldb/tools/lldb-rpc-gen/RPCCommon.cpp
+++ b/lldb/tools/lldb-rpc-gen/RPCCommon.cpp
@@ -308,20 +308,6 @@ bool lldb_rpc_gen::MethodIsDisallowed(ASTContext &Context,
return isDisallowed;
}
-bool lldb_rpc_gen::HasCallbackParameter(CXXMethodDecl *MDecl) {
- bool HasCallbackParameter = false;
- bool HasBatonParameter = false;
- auto End = MDecl->parameters().end();
- for (auto Iter = MDecl->parameters().begin(); Iter != End; Iter++) {
- if ((*Iter)->getType()->isFunctionPointerType())
- HasCallbackParameter = true;
- else if ((*Iter)->getType()->isVoidPointerType())
- HasBatonParameter = true;
- }
-
- return HasCallbackParameter && HasBatonParameter;
-}
-
// NOTE: There's possibly a more clever way to do this, but we're keeping
// the string replacement way here. Here is why it is written this way:
// By the time we have already created a `Method` object, we have extracted the
diff --git a/lldb/tools/lldb-rpc-gen/RPCCommon.h b/lldb/tools/lldb-rpc-gen/RPCCommon.h
index edc03b4f81a3d..2a309d05e5ef7 100644
--- a/lldb/tools/lldb-rpc-gen/RPCCommon.h
+++ b/lldb/tools/lldb-rpc-gen/RPCCommon.h
@@ -32,7 +32,6 @@ bool TypeIsDisallowedClass(QualType T);
bool TypeIsCallbackFunctionPointer(QualType T);
bool MethodIsDisallowed(ASTContext &Context, CXXMethodDecl *MDecl);
-bool HasCallbackParameter(CXXMethodDecl *MDecl);
std::string ReplaceLLDBNamespaceWithRPCNamespace(std::string Name);
std::string StripLLDBNamespace(std::string Name);
More information about the lldb-commits
mailing list