[Lldb-commits] [lldb] [lldb] Remove ValueObject::CastPointerType() methods (PR #191032)
Sergei Barannikov via lldb-commits
lldb-commits at lists.llvm.org
Wed Apr 8 12:05:41 PDT 2026
https://github.com/s-barannikov created https://github.com/llvm/llvm-project/pull/191032
These methods have never been used since their introduction in 2011.
Commit that added them: b2dcc36c
>From ca7990f23c914c2d421ce1ebedaf2d1a268d1467 Mon Sep 17 00:00:00 2001
From: Sergei Barannikov <barannikov88 at gmail.com>
Date: Wed, 8 Apr 2026 22:03:46 +0300
Subject: [PATCH] [lldb] Remove ValueObject::CastPointerType() methods
These methods have never been used since their introduction in 2011.
---
lldb/include/lldb/ValueObject/ValueObject.h | 6 -----
lldb/source/ValueObject/ValueObject.cpp | 27 ---------------------
2 files changed, 33 deletions(-)
diff --git a/lldb/include/lldb/ValueObject/ValueObject.h b/lldb/include/lldb/ValueObject/ValueObject.h
index cf69a713f1366..5476a4a89e5b1 100644
--- a/lldb/include/lldb/ValueObject/ValueObject.h
+++ b/lldb/include/lldb/ValueObject/ValueObject.h
@@ -643,12 +643,6 @@ class ValueObject {
virtual lldb::ValueObjectSP DoCast(const CompilerType &compiler_type);
- virtual lldb::ValueObjectSP CastPointerType(const char *name,
- CompilerType &ast_type);
-
- virtual lldb::ValueObjectSP CastPointerType(const char *name,
- lldb::TypeSP &type_sp);
-
/// Return the target load address associated with this value object.
lldb::addr_t GetLoadAddress();
diff --git a/lldb/source/ValueObject/ValueObject.cpp b/lldb/source/ValueObject/ValueObject.cpp
index 37210055af6e9..51894f718db52 100644
--- a/lldb/source/ValueObject/ValueObject.cpp
+++ b/lldb/source/ValueObject/ValueObject.cpp
@@ -2968,33 +2968,6 @@ lldb::ValueObjectSP ValueObject::Clone(ConstString new_name) {
return ValueObjectCast::Create(*this, new_name, GetCompilerType());
}
-ValueObjectSP ValueObject::CastPointerType(const char *name,
- CompilerType &compiler_type) {
- ValueObjectSP valobj_sp;
- addr_t ptr_value = GetPointerValue().address;
-
- if (ptr_value != LLDB_INVALID_ADDRESS) {
- Address ptr_addr(ptr_value);
- ExecutionContext exe_ctx(GetExecutionContextRef());
- valobj_sp = ValueObjectMemory::Create(
- exe_ctx.GetBestExecutionContextScope(), name, ptr_addr, compiler_type);
- }
- return valobj_sp;
-}
-
-ValueObjectSP ValueObject::CastPointerType(const char *name, TypeSP &type_sp) {
- ValueObjectSP valobj_sp;
- addr_t ptr_value = GetPointerValue().address;
-
- if (ptr_value != LLDB_INVALID_ADDRESS) {
- Address ptr_addr(ptr_value);
- ExecutionContext exe_ctx(GetExecutionContextRef());
- valobj_sp = ValueObjectMemory::Create(
- exe_ctx.GetBestExecutionContextScope(), name, ptr_addr, type_sp);
- }
- return valobj_sp;
-}
-
lldb::addr_t ValueObject::GetLoadAddress() {
if (auto target_sp = GetTargetSP()) {
const bool scalar_is_load_address = true;
More information about the lldb-commits
mailing list