On 15 August 2014 11:01, Tim Northover <t.p.northover at gmail.com> wrote:> On 15 August 2014 10:53, Dan Liew <dan at su-root.co.uk> wrote: >>> I did mean the LangRef, but probably not there, and not to that degree. >> >> For documentation I think being explicit is much better than being implicit. > > Sure, but the entire section on functions is 61 lines. Adding 20 to > cover this bit of trivia is *way* out of balance, and I don't think it > actually improves the usability of the documentation for most readers.You're probably right there. I could cut it down a bit. I still think having +The argument list is a comma seperated sequence of arguments where each argument is of the following form + +Syntax:: + + <type> [parameter Attrs] [name] + in the Function section is useful and it also documents that name is optional.>> I took a look at the "Identifiers" section [1]. There isn't any >> mention of the basic-block case there. > > "Unnamed temporaries are numbered sequentially (using a per-function > incrementing counter, starting with 0). Note that basic blocks are > included in this numbering. For example, if the entry basic block is > not given a label name, then it will get number 0."Oops, you're right I missed that.
Sorry for the delay on this. Is the attached patch any better? I've modified the note in the Identifiers sections and trimmed down my addition to the Functions section. I've been a little inconsistent with using argument/parameter but the entire document seems to be like this so I figured it would be okay. Thanks, Dan. -------------- next part -------------- A non-text attachment was scrubbed... Name: [v2]0001-Add-note-to-LangRef-about-how-function-arguments-can.patch Type: text/x-patch Size: 1714 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140820/9241d580/attachment.bin>
Tim Northover
2014-Aug-20 14:17 UTC
[LLVMdev] Functions with unnamed parameters in LLVM IR
Hi Dan, On 20 August 2014 15:12, Dan Liew <dan at su-root.co.uk> wrote:> Sorry for the delay on this. Is the attached patch any better?Yep, that looks fine to me. Would you like me to commit it or do you have access? Cheers. Tim.