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

2017-09-14 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek marked 3 inline comments as done. Prazek added a comment. Thanks for help. I checked and docs build and looks legit. Sorry that it took so long. Repository: rL LLVM https://reviews.llvm.org/D33852 ___ cfe-commits mailing list

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

2017-09-14 Thread Piotr Padlewski via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL313278: Enable __declspec(selectany) on any platform (authored by Prazek). Repository: rL LLVM https://reviews.llvm.org/D33852 Files: cfe/trunk/include/clang/Basic/Attr.td

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

2017-09-14 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 115243. Prazek marked 8 inline comments as done. Prazek added a comment. Fixed links https://reviews.llvm.org/D33852 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td test/Sema/attr-selectany.c test/SemaCXX/attr-selectany.cpp

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

2017-09-08 Thread Aaron Ballman via Phabricator via cfe-commits
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 aaron.ballman wrote: > majnemer wrote: > > aaron.ballman

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

2017-09-08 Thread Aaron Ballman via Phabricator via cfe-commits
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 majnemer wrote: > aaron.ballman wrote: > > Prazek wrote: >

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

2017-09-08 Thread David Majnemer via Phabricator via cfe-commits
majnemer 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 aaron.ballman wrote: > Prazek wrote: > > aaron.ballman wrote: >

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

2017-09-08 Thread Aaron Ballman via Phabricator via cfe-commits
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 Prazek wrote: > aaron.ballman wrote: > > Prazek wrote: > >

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

2017-09-05 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek marked an inline comment as done. Prazek 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 aaron.ballman wrote: >

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

2017-09-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. Assuming no sphinx issues with the docs, this LGTM, thank you! Comment at: include/clang/Basic/AttrDocs.td:3154 + +def SelectAnyDocs : Documentation { + let

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

2017-08-31 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 113507. Prazek marked 4 inline comments as done. Prazek added a comment. - docs fixes https://reviews.llvm.org/D33852 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td test/Sema/attr-selectany.c test/SemaCXX/attr-selectany.cpp

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

2017-08-31 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek 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 aaron.ballman wrote: > I think you need to set the `Category` as

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

2017-08-31 Thread Aaron Ballman via Phabricator via cfe-commits
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

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

2017-08-31 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 113359. Prazek added a comment. - docs fixes https://reviews.llvm.org/D33852 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td test/Sema/attr-selectany.c test/SemaCXX/attr-selectany.cpp Index: test/SemaCXX/attr-selectany.cpp

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

2017-08-30 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 113357. Prazek added a comment. - docs fixes https://reviews.llvm.org/D33852 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td test/Sema/attr-selectany.c test/SemaCXX/attr-selectany.cpp Index: test/SemaCXX/attr-selectany.cpp

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

2017-08-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/Basic/Attr.td:2477 let Spellings = [Declspec<"selectany">, GCC<"selectany">]; let Documentation = [Undocumented]; } Prazek wrote: > aaron.ballman wrote: > > aaron.ballman wrote: > > > Since

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

2017-08-30 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added inline comments. Comment at: include/clang/Basic/Attr.td:2477 let Spellings = [Declspec<"selectany">, GCC<"selectany">]; let Documentation = [Undocumented]; } aaron.ballman wrote: > aaron.ballman wrote: > > Since we're drastically modifying

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

2017-08-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/Basic/Attr.td:2477 let Spellings = [Declspec<"selectany">, GCC<"selectany">]; let Documentation = [Undocumented]; } aaron.ballman wrote: > Since we're drastically modifying what platforms this

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

2017-08-29 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 113189. Prazek added a comment. - Add documentation https://reviews.llvm.org/D33852 Files: include/clang/Basic/Attr.td test/Sema/attr-selectany.c test/SemaCXX/attr-selectany.cpp Index: test/SemaCXX/attr-selectany.cpp

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

2017-08-29 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added a comment. In https://reviews.llvm.org/D33852#854213, @aaron.ballman wrote: > In https://reviews.llvm.org/D33852#854176, @Prazek wrote: > > > In https://reviews.llvm.org/D33852#853982, @aaron.ballman wrote: > > > > > In https://reviews.llvm.org/D33852#853410, @Prazek wrote: > > > >

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

2017-08-28 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. In https://reviews.llvm.org/D33852#854213, @aaron.ballman wrote: > In https://reviews.llvm.org/D33852#854176, @Prazek wrote: > > > In https://reviews.llvm.org/D33852#853982, @aaron.ballman wrote: > > > > > In https://reviews.llvm.org/D33852#853410, @Prazek wrote: > > > > >

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

2017-08-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D33852#854176, @Prazek wrote: > In https://reviews.llvm.org/D33852#853982, @aaron.ballman wrote: > > > In https://reviews.llvm.org/D33852#853410, @Prazek wrote: > > > > > Sorry for so late fixes, but it would be good to put it in 5.0 > >

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

2017-08-28 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added a comment. In https://reviews.llvm.org/D33852#853982, @aaron.ballman wrote: > In https://reviews.llvm.org/D33852#853410, @Prazek wrote: > > > Sorry for so late fixes, but it would be good to put it in 5.0 > > > I do not think this should be in 5.0, as I believe we're only accepting

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

2017-08-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D33852#853410, @Prazek wrote: > Sorry for so late fixes, but it would be good to put it in 5.0 I do not think this should be in 5.0, as I believe we're only accepting regression fixes at this point. Comment at:

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

2017-08-27 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 112804. Prazek added a comment. Enable it on every platform https://reviews.llvm.org/D33852 Files: include/clang/Basic/Attr.td test/Sema/attr-selectany.c test/SemaCXX/attr-selectany.cpp utils/TableGen/ClangAttrEmitter.cpp Index:

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

2017-08-27 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 112805. Prazek added a comment. remove empty line https://reviews.llvm.org/D33852 Files: include/clang/Basic/Attr.td test/Sema/attr-selectany.c test/SemaCXX/attr-selectany.cpp Index: test/SemaCXX/attr-selectany.cpp

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

2017-08-27 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek marked 9 inline comments as done. Prazek added a comment. Sorry for so late fixes, but it would be good to put it in 5.0 https://reviews.llvm.org/D33852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2017-07-20 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: include/clang/Basic/Attr.td:2421 -def SelectAny : InheritableAttr, TargetSpecificAttr { +def SelectAny : InheritableAttr, TargetSpecificAttr { let Spellings = [Declspec<"selectany">, GCC<"selectany">]; Prazek wrote: >

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

2017-07-19 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added inline comments. Comment at: include/clang/Basic/Attr.td:2421 -def SelectAny : InheritableAttr, TargetSpecificAttr { +def SelectAny : InheritableAttr, TargetSpecificAttr { let Spellings = [Declspec<"selectany">, GCC<"selectany">]; davide wrote:

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

2017-06-17 Thread Davide Italiano via Phabricator via cfe-commits
davide added inline comments. Comment at: include/clang/Basic/Attr.td:2421 -def SelectAny : InheritableAttr, TargetSpecificAttr { +def SelectAny : InheritableAttr, TargetSpecificAttr { let Spellings = [Declspec<"selectany">, GCC<"selectany">]; rnk wrote: >

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

2017-06-16 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: include/clang/Basic/Attr.td:2421 -def SelectAny : InheritableAttr, TargetSpecificAttr { +def SelectAny : InheritableAttr, TargetSpecificAttr { let Spellings = [Declspec<"selectany">, GCC<"selectany">]; Prazek wrote: >

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

2017-06-13 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added inline comments. Comment at: include/clang/Basic/Attr.td:2421 -def SelectAny : InheritableAttr, TargetSpecificAttr { +def SelectAny : InheritableAttr, TargetSpecificAttr { let Spellings = [Declspec<"selectany">, GCC<"selectany">]; rnk wrote: >

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

2017-06-12 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: include/clang/Basic/Attr.td:2421 -def SelectAny : InheritableAttr, TargetSpecificAttr { +def SelectAny : InheritableAttr, TargetSpecificAttr { let Spellings = [Declspec<"selectany">, GCC<"selectany">]; davide wrote: >

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

2017-06-10 Thread Davide Italiano via Phabricator via cfe-commits
davide added inline comments. Comment at: include/clang/Basic/Attr.td:2421 -def SelectAny : InheritableAttr, TargetSpecificAttr { +def SelectAny : InheritableAttr, TargetSpecificAttr { let Spellings = [Declspec<"selectany">, GCC<"selectany">]; Prazek wrote:

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

2017-06-05 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added inline comments. Comment at: include/clang/Basic/Attr.td:2421 -def SelectAny : InheritableAttr, TargetSpecificAttr { +def SelectAny : InheritableAttr, TargetSpecificAttr { let Spellings = [Declspec<"selectany">, GCC<"selectany">]; majnemer

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

2017-06-04 Thread David Majnemer via Phabricator via cfe-commits
majnemer added inline comments. Comment at: include/clang/Basic/Attr.td:2421 -def SelectAny : InheritableAttr, TargetSpecificAttr { +def SelectAny : InheritableAttr, TargetSpecificAttr { let Spellings = [Declspec<"selectany">, GCC<"selectany">]; selectany

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

2017-06-04 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added a comment. I fired bug about the crash: https://bugs.llvm.org/show_bug.cgi?id=33300 https://reviews.llvm.org/D33852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2017-06-04 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 101352. Prazek added a comment. - Fixes https://reviews.llvm.org/D33852 Files: include/clang/Basic/Attr.td test/Sema/attr-selectany-not-supported.c test/Sema/attr-selectany.c test/SemaCXX/attr-selectany.cpp utils/TableGen/ClangAttrEmitter.cpp

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

2017-06-03 Thread Martell Malone via Phabricator via cfe-commits
martell added a comment. > ! In https://reviews.llvm.org/D33852#772290, @davide wrote: > This assumption is not quite right. Also GCC, when targeting Linux, provides > a `-fms-extensions` flag. > There's a bunch of software out there that unfortunately has to target ELF > and build with

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

2017-06-03 Thread Davide Italiano via Phabricator via cfe-commits
davide added a comment. In https://reviews.llvm.org/D33852#772230, @martell wrote: > @Prazek it was not disabled by mistake. > This was a MS extension and it appeared as though the test case should have > been for windows. > I updated it and made the extension available to windows only.

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

2017-06-03 Thread Martell Malone via Phabricator via cfe-commits
martell added a comment. @Prazek it wasn't disabled by mistake. This was a MS extension and it appeared as though the test case should have been for windows. I updated it and made the extension available to windows only. (MSVC, Cygwin, Mingw etc) It didn't expect anyone would want a MS

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

2017-06-03 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added a comment. It seems that this is separate issue - we don't generate comdat for MachO. Indeed we should warn on not supported declspec for macho. https://reviews.llvm.org/D33852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2017-06-02 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added a comment. OK, I will try to make it work on linux and windows only https://reviews.llvm.org/D33852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2017-06-02 Thread Davide Italiano via Phabricator via cfe-commits
davide added a comment. If you take my example, and you pass `-target x86_64-pc-win32-macho`: On clang-3.8, `TinkyWinky` is lowered to a GV with `weak_odr` linkage: $ clang++ 1.cpp -o - -emit-llvm -S -fms-extensions -target x86_64-pc-win32-macho ; ModuleID = '1.cpp' target datalayout =

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

2017-06-02 Thread Davide Italiano via Phabricator via cfe-commits
davide added a comment. I think lowering `__declspec(selectany)` to a `comdat` for GVs on ELF platform is actually reasonable. I don't know what happens on Mach-O (as far as I can tell they don't have a real notion of COMDAT, they use coalesced symbols, but I'm not an expert of the format so

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

2017-06-02 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek created this revision. This feature was disabled probably by mistake in https://reviews.llvm.org/rL300562 This fixes bug https://bugs.llvm.org/show_bug.cgi?id=33285 https://reviews.llvm.org/D33852 Files: include/clang/Basic/Attr.td test/Sema/attr-selectany.c