[Lldb-commits] [PATCH] D60667: Allow direct comparison of ConstString against StringRef

Raphael Isemann via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Apr 25 15:01:38 PDT 2019


teemperor added a comment.

> I didn't mean to imply that `strlen` is called twice.  My point was that there are two linear passes over the string literal:  The first is the call to `strlen` to make the StringRef, and the second is the actual string comparison.

Thanks for the explanation. I reverted the changes that introduce the new operator for non-literal values and I'll see if I can replace those by making ConstString variables. So this patch now only introduces comparisons against literals where the strlen call can be optimized out (which means we only do a direct size cmp for both strings and then a strcmp).


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60667/new/

https://reviews.llvm.org/D60667





More information about the lldb-commits mailing list