[PATCH] D36487: Emit section information for extern variables.

2017-09-26 Thread Erich Keane via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL314262: Emit section information for extern variables. (authored by erichkeane). Changed prior to commit: https://reviews.llvm.org/D36487?vs=116581&id=116739#toc Repository: rL LLVM https://reviews

[PATCH] D36487: Emit section information for extern variables.

2017-09-26 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D36487 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/c

[PATCH] D36487: Emit section information for extern variables.

2017-09-25 Thread Elizabeth Andrews via Phabricator via cfe-commits
eandrews updated this revision to Diff 116581. eandrews added a comment. I've modified the patch to emit a warning for re-declarations only. I also removed the isUsed check. https://reviews.llvm.org/D36487 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/CodeGen/CodeGenModule.cpp li

[PATCH] D36487: Emit section information for extern variables.

2017-09-25 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. > Should I restrict the warning to just redeclarations (without definition) > instead? I think just redeclarations. The pattern of a declaration without a section followed by a definition with a section is common, and not really harmful. Comment at

[PATCH] D36487: Emit section information for extern variables.

2017-09-21 Thread Elizabeth Andrews via Phabricator via cfe-commits
eandrews added inline comments. Comment at: lib/CodeGen/CodeGenModule.cpp:2434 +// Emit section information for extern variables. +if (D->hasExternalStorage() && !D->isThisDeclarationADefinition()) { + if (const SectionAttr *SA = D->getAttr()) efried

[PATCH] D36487: Emit section information for extern variables.

2017-09-21 Thread Elizabeth Andrews via Phabricator via cfe-commits
eandrews updated this revision to Diff 116211. eandrews added a comment. I've updated the patch based on review comments. The changes include setting section unconditionally for extern variables and emitting a warning if section attribute is specified on a redeclaration. https://reviews.llvm.o

[PATCH] D36487: Emit section information for extern variables.

2017-08-31 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: lib/CodeGen/CodeGenModule.cpp:2434 +// Emit section information for extern variables. +if (D->hasExternalStorage() && !D->isThisDeclarationADefinition()) { + if (const SectionAttr *SA = D->getAttr()) eandre

[PATCH] D36487: Emit section information for extern variables.

2017-08-31 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Hey @efriedma : Did you get a chance to take a look at this? She got the langref changes in, so it is just waiting on this. https://reviews.llvm.org/D36487 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http:/

[PATCH] D36487: Emit section information for extern variables.

2017-08-28 Thread Elizabeth Andrews via Phabricator via cfe-commits
eandrews added a comment. *ping* https://reviews.llvm.org/D36487 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D36487: Emit section information for extern variables.

2017-08-22 Thread Elizabeth Andrews via Phabricator via cfe-commits
eandrews added a comment. LangRef has been updated and accepted. You can find it here - https://reviews.llvm.org/rL311459 https://reviews.llvm.org/D36487 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/

[PATCH] D36487: Emit section information for extern variables.

2017-08-14 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. @efriedma : LangRef changed in this review: https://reviews.llvm.org/D36712 https://reviews.llvm.org/D36487 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[PATCH] D36487: Emit section information for extern variables.

2017-08-14 Thread Elizabeth Andrews via Phabricator via cfe-commits
eandrews updated this revision to Diff 111064. eandrews added a comment. As per review comments, removed extra RUNS in lit test. https://reviews.llvm.org/D36487 Files: lib/CodeGen/CodeGenModule.cpp test/CodeGenCXX/extern-section-attribute.cpp Index: test/CodeGenCXX/extern-section-attribut

[PATCH] D36487: Emit section information for extern variables.

2017-08-08 Thread Elizabeth Andrews via Phabricator via cfe-commits
eandrews added inline comments. Comment at: lib/CodeGen/CodeGenModule.cpp:2434 +// Emit section information for extern variables. +if (D->hasExternalStorage() && !D->isThisDeclarationADefinition()) { + if (const SectionAttr *SA = D->getAttr()) efried

[PATCH] D36487: Emit section information for extern variables.

2017-08-08 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: lib/CodeGen/CodeGenModule.cpp:2434 +// Emit section information for extern variables. +if (D->hasExternalStorage() && !D->isThisDeclarationADefinition()) { + if (const SectionAttr *SA = D->getAttr()) Why do

[PATCH] D36487: Emit section information for extern variables.

2017-08-08 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Please propose a patch for LangRef clarifying what exactly it means to have a section attribute on a declaration. Comment at: test/CodeGenCXX/extern-section-attribute.cpp:1 +// RUN: %clang_cc1 -emit-llvm %s -o - -ffreestanding -triple=i386-pc-linux-gn

[PATCH] D36487: Emit section information for extern variables.

2017-08-08 Thread Elizabeth Andrews via Phabricator via cfe-commits
eandrews created this revision. Currently, if _attribute_((section())) is used for extern variables, section information is not emitted in generated IR when the variables are used. This is expected since sections are not generated for external linkage objects. However NiosII requires this info