[cfe-dev] StringRef'ize driver::ArgList::getArgString()

Zach J. Wheeler zachw.foss at gmail.com
Thu Aug 4 09:55:54 PDT 2011


I'm thinking about StringRef'izing ArgList::getArgString(). Doing so would
do away with several calls to strlen, but would not give any immediate
performance benefits because the strings are stored in InputArgList in a
SmallVector<const char*, 16> (typedef'd 'ArgStringList'), and thus
InputArgList::getArgString() must construct a StringRef from a const char*
without knowing the length. The SmallVector could be changed to store
StringRef's, but this would slightly increase memory usage in InputArgList.
Is it worth it to StringRef'ize ArgList::getArgString(), and further worth
it to change the SmallVector in InputArgList to store StringRef's?

Thanks,
ZJ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110804/f068cde7/attachment.html>


More information about the cfe-dev mailing list