@@ -152,7 +152,8 @@
lldb_private::formatters::LibcxxStdVectorSyntheticFrontEnd::Update() {
return lldb::ChildCacheState::eRefetch;
}
-size_t lldb_private::formatters::LibcxxStdVectorSyntheticFrontEnd::
+llvm::Expected
+lldb_private::formatters::LibcxxStdVectorSyntheticFront
@@ -319,40 +319,41 @@
ValueObjectSynthetic::GetChildMemberWithName(llvm::StringRef name,
bool can_create) {
UpdateValueIfNeeded();
- uint32_t index = GetIndexOfChildWithName(name);
+ auto index_or_err = GetIndexOfChildWithName(
@@ -173,7 +173,8 @@
lldb_private::formatters::LibcxxStdProxyArraySyntheticFrontEnd::Update() {
return ChildCacheState::eRefetch;
}
-size_t lldb_private::formatters::LibcxxStdProxyArraySyntheticFrontEnd::
+llvm::Expected
+lldb_private::formatters::LibcxxStdProxyArraySyntheti
@@ -488,10 +488,12 @@
lldb_private::formatters::LibCxxMapIteratorSyntheticFrontEnd::GetChildAtIndex(
return m_pair_sp->GetChildAtIndex(idx);
}
-size_t lldb_private::formatters::LibCxxMapIteratorSyntheticFrontEnd::
+llvm::Expected
+lldb_private::formatters::LibCxxMapIterator
@@ -456,7 +460,7 @@ ExtractLibcxxStringInfo(ValueObject &valobj) {
if (!l)
return {};
- StringLayout layout = l->GetIndexOfChildWithName("__data_") == 0
+ StringLayout layout = l->GetIndexOfChildWithName("__data_").get() == 0
charles-zablit wrote:
Fix
@@ -199,10 +199,12 @@
lldb_private::formatters::StdlibCoroutineHandleSyntheticFrontEnd::Update() {
return lldb::ChildCacheState::eRefetch;
}
-size_t StdlibCoroutineHandleSyntheticFrontEnd::GetIndexOfChildWithName(
+llvm::Expected
+StdlibCoroutineHandleSyntheticFrontEnd::Get
@@ -172,8 +173,15 @@ bool lldb_private::formatters::BlockPointerSummaryProvider(
static const ConstString s_FuncPtr_name("__FuncPtr");
- lldb::ValueObjectSP child_sp = synthetic_children->GetChildAtIndex(
- synthetic_children->GetIndexOfChildWithName(s_FuncPtr_name));
@@ -218,10 +218,11 @@ bool
ScriptedSyntheticChildren::FrontEnd::MightHaveChildren() {
return m_interpreter->MightHaveChildrenSynthProviderInstance(m_wrapper_sp);
}
-size_t ScriptedSyntheticChildren::FrontEnd::GetIndexOfChildWithName(
-ConstString name) {
+llvm::Expected
https://github.com/charles-zablit created
https://github.com/llvm/llvm-project/pull/136693
This patch replaces the use of `UINT32_MAX` as the error return value of
`GetIndexOfChildWithName` with `llvm::Expected`.
>From 143140ca46927e87019dcc818702785ebdb15540 Mon Sep 17 00:00:00 2001
From: Cha
https://github.com/charles-zablit updated
https://github.com/llvm/llvm-project/pull/135963
>From 6dd67fe4ad03f0ec0623717715b8cfcc9537ab3f Mon Sep 17 00:00:00 2001
From: Charles Zablit
Date: Wed, 16 Apr 2025 11:28:54 +0100
Subject: [PATCH 1/3] [lldb] Remove unused API
CompilerType::GetIndexOfFi
charles-zablit wrote:
Sorry I forgot to run `clang-format` I will configure a pre-commit hook.
https://github.com/llvm/llvm-project/pull/135963
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/ll
https://github.com/charles-zablit updated
https://github.com/llvm/llvm-project/pull/135963
>From 6dd67fe4ad03f0ec0623717715b8cfcc9537ab3f Mon Sep 17 00:00:00 2001
From: Charles Zablit
Date: Wed, 16 Apr 2025 11:28:54 +0100
Subject: [PATCH 1/4] [lldb] Remove unused API
CompilerType::GetIndexOfFi
https://github.com/charles-zablit updated
https://github.com/llvm/llvm-project/pull/135963
>From 6dd67fe4ad03f0ec0623717715b8cfcc9537ab3f Mon Sep 17 00:00:00 2001
From: Charles Zablit
Date: Wed, 16 Apr 2025 11:28:54 +0100
Subject: [PATCH 1/3] [lldb] Remove unused API
CompilerType::GetIndexOfFi
charles-zablit wrote:
> I think the test can just do this:
>
> ```
> uint64_t bit_offset;
> std::string name;
> field_type = field_type.GetFieldAtIndex(
> field_type.GetIndexOfChildWithName(field_name,
> /*omit_empty_base_classes=*/false),
> name, &
https://github.com/charles-zablit updated
https://github.com/llvm/llvm-project/pull/135963
>From 6dd67fe4ad03f0ec0623717715b8cfcc9537ab3f Mon Sep 17 00:00:00 2001
From: Charles Zablit
Date: Wed, 16 Apr 2025 11:28:54 +0100
Subject: [PATCH 1/3] [lldb] Remove unused API
CompilerType::GetIndexOfFi
https://github.com/charles-zablit updated
https://github.com/llvm/llvm-project/pull/135963
>From 6dd67fe4ad03f0ec0623717715b8cfcc9537ab3f Mon Sep 17 00:00:00 2001
From: Charles Zablit
Date: Wed, 16 Apr 2025 11:28:54 +0100
Subject: [PATCH 1/2] [lldb] Remove unused API
CompilerType::GetIndexOfFi
charles-zablit wrote:
> We probably shouldnt be removing the test. Is there some way to test whatever
> we used to test without the API?
I see 2 options:
1. Move the body of `CompilerType::GetIndexOfFieldWithName` into the test
directly. This way, we remove the API but keep the test.
2. Keep
https://github.com/charles-zablit edited
https://github.com/llvm/llvm-project/pull/135963
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/charles-zablit edited
https://github.com/llvm/llvm-project/pull/135963
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
charles-zablit wrote:
> It's worth mentioning that the LLVM convention (as opposed to what is done in
> the swift fork) is to avoid force-pushing.
Thanks! I will avoid that for the future PRs 👍
https://github.com/llvm/llvm-project/pull/135963
___
ll
https://github.com/charles-zablit updated
https://github.com/llvm/llvm-project/pull/135963
>From 6dd67fe4ad03f0ec0623717715b8cfcc9537ab3f Mon Sep 17 00:00:00 2001
From: Charles Zablit
Date: Wed, 16 Apr 2025 11:28:54 +0100
Subject: [PATCH] [lldb] Remove unused API
CompilerType::GetIndexOfFieldW
charles-zablit wrote:
> Is this API used for anything outside of that `PlatformSigInfoTest`? It
> doesn't seem to be used anywhere (including the apple fork). Should we just
> remove this API?
It's not used anywhere apart from the `PlatformSigInfoTest`. It's also inside
the `lldb_private` nam
https://github.com/charles-zablit created
https://github.com/llvm/llvm-project/pull/135963
This patch updates the `CompilerType::GetIndexOfFieldWithName` API to use
`llvm::Expected` if no index is found instead of `UINT32_MAX`.
>From aaf9c4ec3e68d78d963cdac3d3f08dc207d49cad Mon Sep 17 00:00:00
23 matches
Mail list logo