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

Puyan Lotfi plotfi at apple.com
Fri Aug 9 14:31:53 PDT 2013


Hi All

I have some changes ready for adding StringRef support to the llvm CommandLine library:

- The purpose of the change is to reduce malloc/free costs associated with std::string since most of the time the cl options could point point to argv pointers.
- cl::opt<std::string> still works and I kept it around because I noticed some tools generate string values for options at runtime.
- This patch also includes changes to several tools in llvm that use this library so that they could use cl:opt<StringRef> instead of cl:opt<std::string> wherever possible. 

Could someone on the list review my changes, give me some feedback, and later check in the changes when they look ready (as I do not have commit access).

Thanks

-Puyan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: clstringref.diff
Type: application/octet-stream
Size: 48211 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130809/58b5f709/attachment.obj>


More information about the llvm-commits mailing list