[llvm-commits] [PATCH] New Path API design.

Chris Lattner clattner at apple.com
Tue Nov 23 15:24:48 PST 2010


On Nov 23, 2010, at 2:56 PM, Michael Spencer wrote:

>> To get the contents of a Twine it has to be rendered to a buffer. Unless we have a global buffer
>> (and a lot of thread safety issues) we can't return a StringRef to that buffer.
> 
> Hmm, you're right. That was originally a StringRef, but I did a search
> and replace with Twine. I think I'll change the functions with
> StringRef &result to take StringRef path. The other option is to use
> even more memory, when the common case would allow returning a
> StringRef into path.

Taking a StringRef instead of a twine makes sense!

-Chris



More information about the llvm-commits mailing list