[PATCH] D48412: [RISCV] Add support for interrupt attribute

2018-07-26 Thread Ana Pazos via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC338045: [RISCV] Add support for interrupt attribute (authored by apazos, committed by ). Herald added a subscriber: jrtc27. Repository: rC Clang https://reviews.llvm.org/D48412 Files: include/clang

[PATCH] D48412: [RISCV] Add support for interrupt attribute

2018-07-24 Thread Alex Bradbury via Phabricator via cfe-commits
asb accepted this revision. asb added a comment. Looks good to me. https://reviews.llvm.org/D48412 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D48412: [RISCV] Add support for interrupt attribute

2018-07-19 Thread Ana Pazos via Phabricator via cfe-commits
apazos updated this revision to Diff 156343. apazos added a comment. - Rebased the patch. - Udpated test case to check for IR attribute. https://reviews.llvm.org/D48412 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td include/clang/Basic/DiagnosticSemaKinds.td lib/Code

[PATCH] D48412: [RISCV] Add support for interrupt attribute

2018-07-19 Thread Alex Bradbury via Phabricator via cfe-commits
asb accepted this revision. asb added a comment. Herald added a subscriber: rkruppe. This looks good to me with two caveats - the tests don't seem to check that the "machine" is the default mode when the "interrupt" attribute has no arguments. - Although the conversion from RISCVInterruptAttr::u

[PATCH] D48412: [RISCV] Add support for interrupt attribute

2018-07-06 Thread Ana Pazos via Phabricator via cfe-commits
apazos added a comment. Hi Aaron, I have commit rights and will commit if after Alex and other RISC-V colleagues get a chance to review too. https://reviews.llvm.org/D48412 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.o

[PATCH] D48412: [RISCV] Add support for interrupt attribute

2018-07-06 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. LGTM! Do you need me to commit on your behalf, or do you have commit privileges? https://reviews.llvm.org/D48412 ___ cfe-commits ma

[PATCH] D48412: [RISCV] Add support for interrupt attribute

2018-07-06 Thread Ana Pazos via Phabricator via cfe-commits
apazos updated this revision to Diff 154447. apazos added a comment. Thanks Aaron, I appreciate you taking the time to review. I have updated the test and removed the warning as discussed. https://reviews.llvm.org/D48412 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td

[PATCH] D48412: [RISCV] Add support for interrupt attribute

2018-07-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: test/Sema/riscv-interrupt-attr.c:23 + // expected-note {{repeated RISC-V 'interrupt' attribute is here}} +__attribute__((interrupt("user"))) void foo8() {} +__attribute__((inter

[PATCH] D48412: [RISCV] Add support for interrupt attribute

2018-07-05 Thread Ana Pazos via Phabricator via cfe-commits
apazos updated this revision to Diff 154322. apazos added a comment. Made the check/warning for prototype explicit. https://reviews.llvm.org/D48412 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td include/clang/Basic/DiagnosticSemaKinds.td lib/CodeGen/TargetInfo.cpp

[PATCH] D48412: [RISCV] Add support for interrupt attribute

2018-07-05 Thread Ana Pazos via Phabricator via cfe-commits
apazos added inline comments. Comment at: test/Sema/riscv-interrupt-attr.c:23 + // expected-note {{repeated RISC-V 'interrupt' attribute is here}} +__attribute__((interrupt("user"))) void foo8() {} +__attribute__((interrupt("s

[PATCH] D48412: [RISCV] Add support for interrupt attribute

2018-07-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: test/Sema/riscv-interrupt-attr.c:23 + // expected-note {{repeated RISC-V 'interrupt' attribute is here}} +__attribute__((interrupt("user"))) void foo8() {} +__attribute__((inter

[PATCH] D48412: [RISCV] Add support for interrupt attribute

2018-07-05 Thread Ana Pazos via Phabricator via cfe-commits
apazos added inline comments. Comment at: test/Sema/riscv-interrupt-attr.c:23 + // expected-note {{repeated RISC-V 'interrupt' attribute is here}} +__attribute__((interrupt("user"))) void foo8() {} +__attribute__((interrupt("s

[PATCH] D48412: [RISCV] Add support for interrupt attribute

2018-06-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/Sema/SemaDeclAttr.cpp:5305 + + if (hasFunctionProto(D) && getFunctionOrMethodNumParams(D) != 0) { +S.Diag(D->getLocation(), diag::warn_riscv_interrupt_attribute) << 0; apazos wrote: > aaron.ballman wrote:

[PATCH] D48412: [RISCV] Add support for interrupt attribute

2018-06-29 Thread Ana Pazos via Phabricator via cfe-commits
apazos updated this revision to Diff 153544. https://reviews.llvm.org/D48412 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td include/clang/Basic/DiagnosticSemaKinds.td lib/CodeGen/TargetInfo.cpp lib/Sema/SemaDeclAttr.cpp test/Sema/riscv-interrupt-attr.c test/Sema/

[PATCH] D48412: [RISCV] Add support for interrupt attribute

2018-06-29 Thread Ana Pazos via Phabricator via cfe-commits
apazos added inline comments. Comment at: lib/Sema/SemaDeclAttr.cpp:5305 + + if (hasFunctionProto(D) && getFunctionOrMethodNumParams(D) != 0) { +S.Diag(D->getLocation(), diag::warn_riscv_interrupt_attribute) << 0; aaron.ballman wrote: > I would have assumed

[PATCH] D48412: [RISCV] Add support for interrupt attribute

2018-06-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/Sema/SemaDeclAttr.cpp:5305 + + if (hasFunctionProto(D) && getFunctionOrMethodNumParams(D) != 0) { +S.Diag(D->getLocation(), diag::warn_riscv_interrupt_attribute) << 0; I would have assumed this would be: `

[PATCH] D48412: [RISCV] Add support for interrupt attribute

2018-06-28 Thread Ana Pazos via Phabricator via cfe-commits
apazos updated this revision to Diff 153419. apazos added a comment. Updated tests and removed Subjects from Attr.td https://reviews.llvm.org/D48412 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td include/clang/Basic/DiagnosticSemaKinds.td lib/CodeGen/TargetInfo.cpp

[PATCH] D48412: [RISCV] Add support for interrupt attribute

2018-06-28 Thread Ana Pazos via Phabricator via cfe-commits
apazos added inline comments. Comment at: lib/Sema/SemaDeclAttr.cpp:5301 + + if (!isFunctionOrMethod(D)) { +S.Diag(D->getLocation(), diag::warn_attribute_wrong_decl_type) aaron.ballman wrote: > apazos wrote: > > aaron.ballman wrote: > > > I don't think you n

[PATCH] D48412: [RISCV] Add support for interrupt attribute

2018-06-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Herald added a subscriber: the_o. Comment at: lib/Sema/SemaDeclAttr.cpp:5280 + // Check the attribute arguments. + if (AL.getNumArgs() > 1) { +S.Diag(AL.getLoc(), diag::err_attribute_too_many_arguments) apazos wrote: > a

[PATCH] D48412: [RISCV] Add support for interrupt attribute

2018-06-22 Thread Ana Pazos via Phabricator via cfe-commits
apazos updated this revision to Diff 152560. apazos added a comment. Addressed review comments. https://reviews.llvm.org/D48412 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td include/clang/Basic/DiagnosticSemaKinds.td lib/CodeGen/TargetInfo.cpp lib/Sema/SemaDeclAtt

[PATCH] D48412: [RISCV] Add support for interrupt attribute

2018-06-22 Thread Ana Pazos via Phabricator via cfe-commits
apazos added inline comments. Comment at: lib/CodeGen/TargetInfo.cpp:8966 + +const RISCVInterruptAttr *Attr = FD->getAttr(); +if (!Attr) aaron.ballman wrote: > You can use `const auto *` here instead of repeating the type. Thanks Aaron, will do the cleanu

[PATCH] D48412: [RISCV] Add support for interrupt attribute

2018-06-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: aaron.ballman. aaron.ballman added inline comments. Comment at: lib/CodeGen/TargetInfo.cpp:8966 + +const RISCVInterruptAttr *Attr = FD->getAttr(); +if (!Attr) You can use `const auto *` here instead of repeating the type.