[llvm-commits] [PATCH] review request: implementation of bounded StringRef::compare

Chris Lattner clattner at apple.com
Fri Apr 15 10:29:39 PDT 2011


On Apr 15, 2011, at 9:43 AM, Lenny Maiorani wrote:

> On 04/15/2011 12:40 AM, Duncan Sands wrote:
>> Hi Lenny, this function seems a bit big to be declared inline.
>> 
>> Ciao, Duncan.
> Thanks for checking it out Duncan. I figured since it was only slightly larger than the original compare() it wouldn't be an issue, but you are correct, it is getting a little long. Attached is a new patch which implements the same thing, but not inlined.

I'm not opposed to this, but why is this needed?  StringRef carries a length, so you could just substr() the strings and then compare them?

-Chris



More information about the llvm-commits mailing list