[llvm-dev] Is it time to allow StringRef to be constructed from nullptr?

Pete Cooper via llvm-dev llvm-dev at lists.llvm.org
Sun Sep 25 17:15:58 PDT 2016

Sent from my iPhone

> On Sep 25, 2016, at 4:46 PM, Mehdi Amini <mehdi.amini at apple.com> wrote:
> To be clear: I’m not worried that this would add cost to the literal case.
Same here. Strlen should be optimised easily enough, and is from what you've found. If anything, all this will do is move that optimisation from the optimiser to the front end which is fine IMO. Might even speed up debug builds just a little :)
> And the other change I’m suggesting is (relatively) orthogonal and isn’t a blocker for what you want to do.
This is my view too. StringRef(nullptr) is reasonable even if we leave the literal behaviour the same for now.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160925/cdcb3483/attachment.html>

More information about the llvm-dev mailing list