Skip to content

Commit

Permalink
cg: Add stub enableif/diagnoseif visitors.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jezurko committed Nov 4, 2024
1 parent d430ecf commit 136609b
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 @@ -69,6 +69,8 @@ namespace vast::cg {
mlir_attr VisitArtificialAttr(const clang::ArtificialAttr *attr);
mlir_attr VisitOverloadableAttr(const clang::OverloadableAttr *attr);
mlir_attr VisitPassObjectSizeAttr(const clang::PassObjectSizeAttr *attr);
mlir_attr VisitEnableIfAttr(const clang::EnableIfAttr *attr);
mlir_attr VisitDiagnoseIfAttr(const clang::DiagnoseIfAttr *attr);

private:
template< typename attr_t, typename... args_t >
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 @@ -200,4 +200,12 @@ namespace vast::cg
mlir_attr default_attr_visitor::VisitPassObjectSizeAttr(const clang::PassObjectSizeAttr *attr) {
return make< hl::PassObjectSizeAttr >(attr->getType(), attr->isDynamic());
}

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

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

0 comments on commit 136609b

Please sign in to comment.