[llvm-commits] [PATCH] review request - bounded case-insensitive StringRef compare
Chris Lattner
clattner at apple.com
Thu Apr 28 08:41:14 PDT 2011
On Apr 28, 2011, at 8:20 AM, Lenny Maiorani wrote:
> On 04/27/2011 07:16 PM, Chris Lattner wrote:
>> On Apr 26, 2011, at 3:21 PM, Lenny Maiorani wrote:
>>
>>> This patch adds bounded case-insensitive compare to StringRef class, imitating strncasecmp(). Includes unit tests.
>> I'm still dubious about the 'n' functions being in StringRef, I don't understand why clients can't substr() the string before calling non-'n' versions.
>>
>> -Chris
> Chris,
>
> I understand your desire to keep the feature creep to a minimum. I can implement the features I want using substr(). Should I also back-out r129582 where I added a bounded version of compare()? I would need to back-out a change in the Clang SA and use substr() instead prior to backing this out.
Yes, that sounds like a better approach. Given that all StringRef operations are implicitly length bounded, I think that having the few clients that need "n" functionality do this is the right way to go. Thanks!
-Chris
More information about the llvm-commits
mailing list