diff --git a/include/vast/Conversion/TypeConverters/HLToStd.hpp b/include/vast/Conversion/TypeConverters/HLToStd.hpp index b93df470e0..ae7034ee25 100644 --- a/include/vast/Conversion/TypeConverters/HLToStd.hpp +++ b/include/vast/Conversion/TypeConverters/HLToStd.hpp @@ -124,9 +124,7 @@ namespace vast::conv::tc { self_t &self() { return static_cast< self_t & >(*this); } public: - - auto convert_fn_type() - { + auto convert_fn_type() { return [&](core::FunctionType t) -> maybe_type_t { // To be consistent with how others use the conversion, we // do not convert input types directly. @@ -134,18 +132,18 @@ namespace vast::conv::tc { auto results = self().convert_types_to_types(t.getResults()); - if (!signature_conversion || !results) + if (!signature_conversion || !results) { return {}; + } return { core::FunctionType::get( - t.getContext(), - signature_conversion->getConvertedTypes(), *results, t.isVarArg()) }; + t.getContext(), signature_conversion->getConvertedTypes(), *results, + t.isVarArg() + ) }; }; } - void init() { - self().addConversion(convert_fn_type()); - } + void init() { self().addConversion(convert_fn_type()); } }; struct HLToStd diff --git a/include/vast/Conversion/TypeConverters/TypeConverter.hpp b/include/vast/Conversion/TypeConverters/TypeConverter.hpp index e4f80c72ec..84be9bd082 100644 --- a/include/vast/Conversion/TypeConverters/TypeConverter.hpp +++ b/include/vast/Conversion/TypeConverters/TypeConverter.hpp @@ -111,11 +111,11 @@ namespace vast::conv::tc { return { out }; } - maybe_signature_conversion_t signature_conversion(const auto &inputs) - { + maybe_signature_conversion_t signature_conversion(const auto &inputs) { signature_conversion_t sc(inputs.size()); - if (mlir::failed(self().convertSignatureArgs(inputs, sc))) + if (mlir::failed(self().convertSignatureArgs(inputs, sc))) { return {}; + } return { std::move(sc) }; } @@ -125,16 +125,14 @@ namespace vast::conv::tc { // * types of attributes // types of arguments are result types of a different op. return [this](operation op) { - auto res = self().isLegal(op->getResults().getTypes()); + auto res = self().isLegal(op->getResults().getTypes()); auto attrs = contains_subtype(op->getAttrDictionary(), self().get_is_illegal()); return res && !attrs; }; } auto get_is_illegal() { - return [this](mlir_type type) { - return !this->self().isLegal(type); - }; + return [this](mlir_type type) { return !this->self().isLegal(type); }; } mcontext_t &get_context() { return self().mctx; }