diff --git a/include/vast/CodeGen/DefaultAttrVisitor.hpp b/include/vast/CodeGen/DefaultAttrVisitor.hpp index 37b6c1c5f3..e41fc8585d 100644 --- a/include/vast/CodeGen/DefaultAttrVisitor.hpp +++ b/include/vast/CodeGen/DefaultAttrVisitor.hpp @@ -26,8 +26,10 @@ namespace vast::cg { mlir_attr VisitConstAttr(const clang::ConstAttr *attr); mlir_attr VisitSectionAttr(const clang::SectionAttr *attr); + mlir_attr VisitTargetAttr(const clang::TargetAttr *attr); mlir_attr VisitAliasAttr(const clang::AliasAttr *attr); mlir_attr VisitErrorAttr(const clang::ErrorAttr *attr); + mlir_attr VisitFlattenAttr(const clang::FlattenAttr *attr); mlir_attr VisitFormatAttr(const clang::FormatAttr *attr); mlir_attr VisitFormatArgAttr(const clang::FormatArgAttr *attr); mlir_attr VisitAnnotateAttr(const clang::AnnotateAttr *attr); diff --git a/lib/vast/CodeGen/DefaultAttrVisitor.cpp b/lib/vast/CodeGen/DefaultAttrVisitor.cpp index 4300b85a26..a7d98ffcb2 100644 --- a/lib/vast/CodeGen/DefaultAttrVisitor.cpp +++ b/lib/vast/CodeGen/DefaultAttrVisitor.cpp @@ -14,6 +14,10 @@ namespace vast::cg return make< hl::SectionAttr >(attr->getName()); } + mlir_attr default_attr_visitor::VisitTargetAttr(const clang::TargetAttr *attr) { + return make< hl::TargetAttr >(attr->getFeaturesStr()); + } + mlir_attr default_attr_visitor::VisitAliasAttr(const clang::AliasAttr *attr) { return make< hl::AliasAttr >(attr->getAliasee()); } @@ -22,6 +26,10 @@ namespace vast::cg return make< hl::ErrorAttr >(attr->getUserDiagnostic()); } + mlir_attr default_attr_visitor::VisitFlattenAttr(const clang::FlattenAttr *attr) { + return make< hl::FlattenAttr >(); + } + mlir_attr default_attr_visitor::VisitFormatAttr(const clang::FormatAttr *attr) { return make< hl::FormatAttr >(attr->getType()->getName()); }