[Lldb-commits] [PATCH] D65122: [Symbol] Use llvm::Expected when getting TypeSystems
Jonas Devlieghere via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Jul 25 21:10:04 PDT 2019
JDevlieghere added a comment.
In D65122#1602025 <https://reviews.llvm.org/D65122#1602025>, @xiaobai wrote:
> After going through this and modifying this patch, I can't help but wonder if `llvm::Optional<TypeSystem &>` would be more appropriate. There are plenty of instances where it's not a hard error if you can't get a TypeSystem and the appropriate action is probably just to log and move on. I am conflicted because I like how Expected forces you to be more rigorous with error handling but I can't help but feel it is the wrong abstraction. Thoughts?
I think an `Optional` would be fine. We can always create an `Error` when necessary, with the trade-off of being a little less precision about the root cause, which honestly doesn't seem that informative anyway.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65122/new/
https://reviews.llvm.org/D65122
More information about the lldb-commits
mailing list