[PATCH] LLDB formatter for llvm::Optional

Enrico Granata egranata at apple.com
Thu Feb 19 19:05:09 PST 2015


> On Feb 19, 2015, at 6:58 PM, Justin Bogner <mail at justinbogner.com> wrote:
> 
> Enrico Granata <egranata at apple.com> writes:
>> Instead of str(), one could use .GetSummary() on the casted SBValue. And if
>> that returns None, fallback to GetValue(). IIRC, str(SBValue) does a little
>> more than necessary.
> 
> I tried changing this to use GetSummary and fall back to GetValue, but
> they often both return None. I guess the extra work str() does is
> necessary after all.
> 
> I've committed this in r229956.


It’s fine to commit this for now - but as a follow-up, do you have any examples of when LLDB fails that way?
And this doesn’t need to be part of this llvm-commits thread, following up offline is just fine

Thanks,
- Enrico
📩 egranata@.com ☎️ 27683




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150219/a9bedf8b/attachment.html>


More information about the llvm-commits mailing list