Missing formal definition of "declare"?

Hi,

I don't find the formal definition of "declare", although it is used
in ~300 hundred of places. Do I miss something? If it is not formally
defined, should it be defined? Thanks.

https://llvm.org/docs/LangRef.html

From: llvm-dev [mailto:llvm-dev-bounces@lists.llvm.org] On Behalf Of Peng
Yu via llvm-dev
Sent: Saturday, January 26, 2019 11:11 PM
To: llvm-dev
Subject: [llvm-dev] Missing formal definition of "declare"?

Hi,

I don't find the formal definition of "declare", although it is used
in ~300 hundred of places. Do I miss something? If it is not formally
defined, should it be defined? Thanks.

https://llvm.org/docs/LangRef.html

If you look in the section on "Functions" in that page, it describes
the "declare" statement in the second paragraph. Admittedly, it does
not provide a formal syntax as it does for "define" but the information
is there.
--paulr

If you look in the section on "Functions" in that page, it describes
the "declare" statement in the second paragraph. Admittedly, it does
not provide a formal syntax as it does for "define" but the information
is there.

OK. Thanks.

It definitely better to write the definition of "declare" in a
formatted form similar to "define". It is hard to notice it as it is
currently written,

Syntax:

define [linkage] [PreemptionSpecifier] [visibility] [DLLStorageClass]
       [cconv] [ret attrs]
       <ResultType> @<FunctionName> ([argument list])
       [(unnamed_addr|local_unnamed_addr)] [AddrSpace] [fn Attrs]
       [section "name"] [comdat [($name)]] [align N] [gc] [prefix Constant]
       [prologue Constant] [personality Constant] (!name !N)* { ... }

From: Peng Yu [mailto:pengyu.ut@gmail.com]
Sent: Monday, January 28, 2019 9:54 AM
To: Robinson, Paul
Cc: llvm-dev
Subject: Re: [llvm-dev] Missing formal definition of "declare"?

> If you look in the section on "Functions" in that page, it describes
> the "declare" statement in the second paragraph. Admittedly, it does
> not provide a formal syntax as it does for "define" but the information
> is there.

OK. Thanks.

It definitely better to write the definition of "declare" in a
formatted form similar to "define". It is hard to notice it as it is
currently written,

I have filed PR40498 with this suggestion, seems reasonable to me.
--paulr