[PATCH] D30326: [MS-ABI] Allow #pragma section to choose for ZI data

2017-06-22 Thread Javed Absar via Phabricator via cfe-commits
javed.absar abandoned this revision. javed.absar added a comment. Abandoning as there is a separate pragma clang section implementation now. https://reviews.llvm.org/D30326 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.or

[PATCH] D30326: [MS-ABI] Allow #pragma section to choose for ZI data

2017-03-01 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. This functionality doesn't feel worth a driver flag. It customizes a very small aspect of a Microsoft extension that was only implemented for compatibility. It also reimplements the logic that LLVM uses in the backend to put global variables in .bss or .data. Can you elabor

[PATCH] D30326: [MS-ABI] Allow #pragma section to choose for ZI data

2017-03-01 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Adding incompatible extensions to MS extensions sounds like bad precedent to me. I think it'd be good if a code owner could opine on this change before it goes in. https://reviews.llvm.org/D30326 ___ cfe-commits mailing lis

[PATCH] D30326: [MS-ABI] Allow #pragma section to choose for ZI data

2017-03-01 Thread Javed Absar via Phabricator via cfe-commits
javed.absar added a comment. Hi Nico: This is for the case when using '#pragma bss_seg..' feature outside of msvc context. That's the reason for the flag. One could use attribute, but as attribute is attached to individual declaration, while pragma applies to whole file (unless superseded by an

[PATCH] D30326: [MS-ABI] Allow #pragma section to choose for ZI data

2017-02-28 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. I'm surprised this is behind a flag. This pragma attempts to be compatible with cl.exe. Does cl.exe do this by default? If so, we should do it by default. If not, why add this as an incompatible thing to an MS extension instead of keying it off some attribute that works

[PATCH] D30326: [MS-ABI] Allow #pragma section to choose for ZI data

2017-02-28 Thread Roger Ferrer Ibanez via Phabricator via cfe-commits
rogfer01 added a comment. Thanks @javed.absar This LGTM now. https://reviews.llvm.org/D30326 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D30326: [MS-ABI] Allow #pragma section to choose for ZI data

2017-02-27 Thread Javed Absar via Phabricator via cfe-commits
javed.absar updated this revision to Diff 89897. javed.absar added a comment. Hi Roger: Thanks for the review. I have extended the test and fixed driver flag passing that you pointed out. Regarding the check in Sema::DeclarationIsZeroInitialized, the check if to keep the function return value c

[PATCH] D30326: [MS-ABI] Allow #pragma section to choose for ZI data

2017-02-27 Thread Roger Ferrer Ibanez via Phabricator via cfe-commits
rogfer01 added inline comments. Comment at: lib/Driver/Tools.cpp:5940 + options::OPT_fno_always_use_bss, false)) +CmdArgs.push_back("-always-use-bss"); + I think you mean `"-falways-use-bss"`. Please add a test that checks that the driver i

[PATCH] D30326: [MS-ABI] Allow #pragma section to choose for ZI data

2017-02-24 Thread Javed Absar via Phabricator via cfe-commits
javed.absar created this revision. This patch enables the msvc pragma section to choose whether zero initialized variables are to be placed in data_seg or bss_seg. The current implementation ignores bss_seg directive for variables that are initialized (i.e. it does not check if the initializat