[llvm-commits] [Review] Attributes Documentation
Bill Wendling
wendling at apple.com
Tue Dec 4 20:52:01 PST 2012
On Dec 4, 2012, at 6:06 PM, Sean Silva <silvas at purdue.edu> wrote:
> +define void @f() #0 #1 { ... }
>
> do we have a production covering the usage of #<n> in this position?
> It says "they are space separated", but is there somewhere where this
> is actually in a production? The rough production for function
> definitions just says "[fn_Attrs]".
>
We have few productions for most things. :) I can try to make it more explicit by adding it to the function production.
> +<p>N.B. It's an error for a function to reference two attribute groups which
> + have conflicting attributes. For example, this code is invalid
> + because <tt>noinline</tt> (in attribute group <tt>#0</tt>)
> + and <tt>alwaysinline</tt> (in attribute group <tt>#1</tt>) are mutually
> + exclusive:</p>
>
> by "it is an error" does this mean that the compiler might do
> unexpected things (possibly silently), or that the compiler (or
> language processor, or whatever) will cleanly diagnose the situation
> and refuse to proceed? If it is the former, you might want to bump
> this from "N.B." to "Warning".
>
It will be diagnosed as an error by the IR assembler.
-bw
More information about the llvm-commits
mailing list