[LLVMdev] Guidance on using pointers vs. references for function arguments

Chris Lattner clattner at apple.com
Mon May 26 21:36:40 PDT 2014


On May 26, 2014, at 9:31 PM, Chris Lattner <clattner at apple.com> wrote:

> That said, if I were to lay down a rule, I think the right general rule would be: pointers for "classes" everywhere, references for value types, and pass by value when it is >= the efficiency of pass by value for value types.

Sorry, I meant:


> That said, if I were to lay down a rule, I think the right general rule would be: pointers for "classes" everywhere, references for value types, and pass by value when it is >= the efficiency of pass by reference for value types.

-Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140526/9c5cfe2a/attachment.html>


More information about the llvm-dev mailing list