[llvm] r294555 - [GlobalISel] Simplify StringRef parameters. NFC.

Daniel Sanders via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 9 11:24:03 PST 2017


> On 9 Feb 2017, at 17:29, Diana Picus <diana.picus at linaro.org> wrote:
> 
> On 9 February 2017 at 18:19, Daniel Sanders via llvm-commits
> <llvm-commits at lists.llvm.org> wrote:
>> By the way, I think these ought to be 'const StringRef &'. It's more common and also avoids copying the StringRef object.
> 
> Um, actually the programmer's manual [1] says "StringRef is small and
> pervasive enough in LLVM that it should always be passed by value.".
> If it's time to change that policy, we should update the manual.
> 
> Just saying,
> Diana
> 
> [1] http://llvm.org/docs/ProgrammersManual.html#passing-strings-the-stringref-and-twine-classes

Thanks. In that case I'll stick to 'const StringRef' and 'StringRef'.


More information about the llvm-commits mailing list