[llvm-dev] RFC: Constructing StringRefs at compile time

Yaron Keren via llvm-dev llvm-dev at lists.llvm.org
Mon Dec 12 15:39:45 PST 2016


Basic LLVM data structures are frequently used without the llvm namespace
prefix, either due to 'using namespace llvm' or from Basic/LLVM.h where we
have 'using llvm::StringRef;' and would probably want 'using
llvm::StringLiteral;'.
Better avoid the name clash.
ConstStringRef? StaticStringRef?



2016-12-12 23:02 GMT+02:00 Zachary Turner via llvm-dev <
llvm-dev at lists.llvm.org>:

> Well, apparently clang has clang::StringLiteral in clang/AST/Expr.h
>
> So, our options are either: Allow this name clash (obviously the
> namespaces don't clash, only the names) and deal with it when it's an issue
> (which will be limited to clang, and even then not very often), or choose a
> different name.
>
> Thoughts?
>
> On Mon, Dec 12, 2016 at 11:53 AM Zachary Turner <zturner at google.com>
> wrote:
>
>> I can. I'll whip something up today
>> On Fri, Dec 9, 2016 at 1:18 AM Malcolm Parsons <malcolm.parsons at gmail.com>
>> wrote:
>>
>> On 2 December 2016 at 17:12, James Y Knight <jyknight at google.com> wrote:
>> > +1 from me for the StringLiteral proposal from a few messages back.
>>
>> Zachary, do you want to commit StringLiteral?
>>
>> --
>> Malcolm Parsons
>>
>>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161213/4eb15363/attachment.html>


More information about the llvm-dev mailing list