[PATCH] Allow for the use of StringRef command line options instead of cl::opt<std::string>

Puyan Lotfi plotfi at apple.com
Mon Sep 23 18:16:56 PDT 2013


Sounds good. I do not yet have commit access so I’ll need that or someone to commit it for me. 

-Thanks

Puyan

On Sep 23, 2013, at 10:00 AM, Chris Lattner <clattner at apple.com> wrote:

> 
> On Sep 19, 2013, at 3:01 PM, Puyan Lotfi <plotfi at apple.com> wrote:
> 
>> Hi All
>> 
>> I’ve improved this StringRef patch and I’d like some more feedback and hopefully a submission.
>> My changes to the original patch thus far have been:
>> 
>> - I added changes to CreateTargerMachine() in clang to have the SmallVector passed in from the caller.
>> - I found more places where cl::opt<str::string> was used, and I changed them to use cl::opt<StringRef>.
>> 
>> I’ve attached a patch that should apply cleanly with an llvm checkout that includes clang checked out into the tools directory. 
> 
> This looks great to me.  When you commit it, please split it into two pieces though:
> 
> 1) The part that adds cl compatibility with StringRef.
> 2) The part that switches lots of cl::opt<> to use StringRef instead of std::string.
> 
> Thanks Puyan,
> 
> -Chris





More information about the llvm-commits mailing list