On 14.04.2011, at 09:56, Jay Foad <[email protected]> wrote:

> This patch removes a bit of code from StringRef by making it derive
> from ArrayRef<char>.
> 
> Comments? OK to commit? The savings aren't huge, so I'm not
> particularly wedded to the patch.

Hi Jay,

Have you checked the compile time impact of this? StringRef.h is included 
everywhere and ArrayRef.h pulls in Smallvector and Vector which are both big 
headers. I don't think this is worth it.


> 
> Incidentally, I didn't touch StringRef::front(), back() or
> operator[](), because they return char, whereas the ArrayRef<char>
> implementations would return const char &. My C++ isn't good enough to
> work out whether that's an important difference or not.
> 
> ArrayRef.h  |    2 +-
> StringRef.h |   39 +++++++--------------------------------
> 2 files changed, 8 insertions(+), 33 deletions(-)
> 
> Thanks,
> Jay.
> <stringref.diff>
> _______________________________________________
> cfe-commits mailing list
> [email protected]
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to