Skip to content

Commit

Permalink
cg: Add enableif/diagnoseif attrs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jezurko authored and xlauko committed Nov 4, 2024
1 parent 513c6e8 commit 7437fcd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/vast/CodeGen/DefaultAttrVisitor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,13 @@ namespace vast::cg {
mlir_attr VisitAsmLabelAttr(const clang::AsmLabelAttr *attr);
mlir_attr VisitAllocAlignAttr(const clang::AllocAlignAttr *attr);
mlir_attr VisitAllocSizeAttr(const clang::AllocSizeAttr *attr);
mlir_attr VisitEnableIfAttr(const clang::EnableIfAttr *attr);
mlir_attr VisitLeafAttr(const clang::LeafAttr *attr);
mlir_attr VisitColdAttr(const clang::ColdAttr *attr);
mlir_attr VisitDeprecatedAttr(const clang::DeprecatedAttr *attr);
mlir_attr VisitTransparentUnionAttr(const clang::TransparentUnionAttr *attr);
mlir_attr VisitUnavailableAttr(const clang::UnavailableAttr *attr);
mlir_attr VisitDiagnoseIfAttr(const clang::DiagnoseIfAttr *attr);
mlir_attr VisitReturnsTwiceAttr(const clang::ReturnsTwiceAttr *attr);
mlir_attr VisitMayAliasAttr(const clang::MayAliasAttr *attr);
mlir_attr VisitUnusedAttr(const clang::UnusedAttr *attr);
Expand Down
8 changes: 8 additions & 0 deletions lib/vast/CodeGen/DefaultAttrVisitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ namespace vast::cg
return make< hl::AllocSizeAttr >(attr->getElemSizeParam().getSourceIndex(), num);
}

mlir_attr default_attr_visitor::VisitEnableIfAttr(const clang::EnableIfAttr *attr) {
return make< hl::EnableIfAttr >();
}

mlir_attr default_attr_visitor::VisitLeafAttr(const clang::LeafAttr *attr) {
return make< hl::LeafAttr >();
}
Expand All @@ -129,6 +133,10 @@ namespace vast::cg
return make< hl::UnavailableAttr >(attr->getMessage());
}

mlir_attr default_attr_visitor::VisitDiagnoseIfAttr(const clang::DiagnoseIfAttr *attr) {
return make< hl::DiagnoseIfAttr >();
}

mlir_attr default_attr_visitor::VisitReturnsTwiceAttr(const clang::ReturnsTwiceAttr *attr) {
return make< hl::ReturnsTwiceAttr >();
}
Expand Down

0 comments on commit 7437fcd

Please sign in to comment.