[PATCH] D33852: Enable __declspec(selectany) on linux

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 31 12:14:16 PDT 2017


aaron.ballman added inline comments.


================
Comment at: include/clang/Basic/AttrDocs.td:3154
+
+def SelectAnyDocs : Documentation {
+   let Content = [{This attribute makes global symbol have a weak definition
----------------
I think you need to set the `Category` as well.

To test this you should run something like (replacing <root> and fixing up path separators as needed):
```
clang-tblgen -gen-attr-docs -I <root>\llvm\tools\clang\include <root>\llvm\tools\clang\include\clang\Basic\Attr.td -o <root>\llvm\tools\clang\docs\AttributeReference.rst
```


================
Comment at: include/clang/Basic/AttrDocs.td:3155
+def SelectAnyDocs : Documentation {
+   let Content = [{This attribute makes global symbol have a weak definition
+   (link-once), meaning that the linker can select any definition.
----------------
You should format this the same as other documentation in the file.


================
Comment at: include/clang/Basic/AttrDocs.td:3155
+def SelectAnyDocs : Documentation {
+   let Content = [{This attribute makes global symbol have a weak definition
+   (link-once), meaning that the linker can select any definition.
----------------
aaron.ballman wrote:
> You should format this the same as other documentation in the file.
How about: `This attribute appertains to a global symbol, causing it to have a weak definition (linkonce), allowing the linker to select any definition.`?

It might also be nice to link the `linkonce` with https://llvm.org/docs/LangRef.html#linkage-types.


================
Comment at: include/clang/Basic/AttrDocs.td:3161
+}
\ No newline at end of file

----------------
Keep the newline at the end of the file.


https://reviews.llvm.org/D33852





More information about the cfe-commits mailing list