[Lldb-commits] [lldb] [lldb] Upgrade `GetIndexOfChildWithName` to use `llvm::Expected` (PR #136693)
Augusto Noronha via lldb-commits
lldb-commits at lists.llvm.org
Tue Apr 22 13:48:25 PDT 2025
================
@@ -456,9 +464,13 @@ ExtractLibcxxStringInfo(ValueObject &valobj) {
if (!l)
return {};
- StringLayout layout = l->GetIndexOfChildWithName("__data_") == 0
- ? StringLayout::DSC
- : StringLayout::CSD;
+ auto index_or_err = l->GetIndexOfChildWithName("__data_");
+ if (!index_or_err)
+ LLDB_LOG_ERROR(GetLog(LLDBLog::Types), index_or_err.takeError(), "{0}");
+ return {};
----------------
augusto2112 wrote:
This is supposed to be inside the if statement body right?
https://github.com/llvm/llvm-project/pull/136693
More information about the lldb-commits
mailing list