[Lldb-commits] [lldb] draft: [lldb] Upgrade ValueObject::GetData to return llvm::Expected (PR #130516)

Adrian Prantl via lldb-commits lldb-commits at lists.llvm.org
Mon Mar 17 14:26:20 PDT 2025


adrian-prantl wrote:

>I was also curious to know if I'd have to change any test code too, I've tried to unit test but got error relating to "expected" values. Would I need to change something in DumpValueObjectOptionsTests.cpp?

Usually wrapping calls in `llvm::expectedToOptional()` is the cheapest way to just adapt the API in places where the error handling doesn't matter. You could even write a wrapper for that test that creates a Status from the error and imitates the old API, just inside the unit tests.

https://github.com/llvm/llvm-project/pull/130516


More information about the lldb-commits mailing list