> _______________________________________________
> LLVM Developers mailing list
> llvm...@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
_______________________________________________
LLVM Developers mailing list
llvm...@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
StringRef is explicitly sized. I'd be more interested in which
interfaces are actually simplified by implicit or explicit conversions
between StringRef and ArrayRef<char>.
Joerg
On Fri, Nov 06, 2015 at 09:07:43AM -0500, Ramkumar Ramachandra via llvm-dev wrote:
> I think it's the same difference we have between int * and
> ArrayRef<int>, for instance. If you have a raw pointer, you are
> expected to keep track of the size out-of-band. In aggregate types,
> size is part of the type, making it very difficult to confuse a [1 x
> i8] with a [3 x i8]. Many people probably use the raw pointer as a way
> to hold a reference to dynamically allocated memory, and as a
> type-escape hatch.
StringRef is explicitly sized. I'd be more interested in which
interfaces are actually simplified by implicit or explicit conversions
between StringRef and ArrayRef<char>.