labath wrote: > > We can't change the signature of CalculateSymbolContextFunction as it's an > > abstract function (and some of its implementations can return nullptr) > > By which you mean, because there are still use cases for > `CalculateSymbolContextFunction` to return `nullptr`, so it must remain.
Correct. `CalculateSymbolContextFunction` is defined in the `SymbolContextScope` class, which is an interface for "things that can turn themselves into other things". So e.g. `CompileUnit::CalculateSymbolContextFunction` returns null because there's no mapping from a compile unit to a function (but there is a mapping from a function to a compile unit, so we could potentially make a non-fallible version of `Function::CalculateCompileUnit`). https://github.com/llvm/llvm-project/pull/137611 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits