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

Chandler Carruth chandlerc at google.com
Mon May 26 21:43:12 PDT 2014


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

> Ultimately, (as I said in my prior email) I don't think there is a problem
> to solve here because I don't think that any of these things are actively
> "bad". Maybe its just the devs I know who don't really have trouble here,
> but its not one of the complaints I hear from others or have myself in
> day-to-day development.
>
> If mixing pointers and references for the same type in LLVM's APIs is a
> serious problem in your mind, what is your concrete suggestion? What should
> the end state look like?
>
>
> I'm not really sure that we need to "solve" this problem.  Can you restate
> exactly what the problem is?  We don't all need the compiler to have
> perfectly identical code in every pass, for example.
>

We have to be talking past each other. Let me re-quote my email:

"I don't think there is a problem to solve here ..."

And then your email:

"That said, I still don't see a huge problem being solved here..."

We're in agreement about this not being worth laying down rules, even we
disagree about what the rules should be were we to need strict ones.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140526/93cee1e8/attachment.html>


More information about the llvm-dev mailing list