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
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
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
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
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
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
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
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
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
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
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
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
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:
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/
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
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: `
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
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
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
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
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
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.
22 matches
Mail list logo