[Mlir-commits] [mlir] 02afc69 - [mlir][NFC] clang-format file
Markus Böck
llvmlistbot at llvm.org
Wed Aug 9 07:45:45 PDT 2023
Author: Markus Böck
Date: 2023-08-09T16:45:38+02:00
New Revision: 02afc698389f8b6ed34f28b6fe895facb1a061d3
URL: https://github.com/llvm/llvm-project/commit/02afc698389f8b6ed34f28b6fe895facb1a061d3
DIFF: https://github.com/llvm/llvm-project/commit/02afc698389f8b6ed34f28b6fe895facb1a061d3.diff
LOG: [mlir][NFC] clang-format file
Added:
Modified:
mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
Removed:
################################################################################
diff --git a/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp b/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
index 44cb61a93b545d..36bf2460f3b5da 100644
--- a/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
+++ b/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
@@ -1312,7 +1312,8 @@ void OpEmitter::genPropertiesSupport() {
name, getAttr);
} else {
- const auto *namedAttr = llvm::dyn_cast_if_present<const AttributeMetadata *>(attrOrProp);
+ const auto *namedAttr =
+ llvm::dyn_cast_if_present<const AttributeMetadata *>(attrOrProp);
StringRef name = namedAttr->attrName;
std::string getAttr;
llvm::raw_string_ostream os(getAttr);
@@ -1376,7 +1377,8 @@ void OpEmitter::genPropertiesSupport() {
.addSubst("_storage", propertyStorage)));
continue;
}
- const auto *namedAttr = llvm::dyn_cast_if_present<const AttributeMetadata *>(attrOrProp);
+ const auto *namedAttr =
+ llvm::dyn_cast_if_present<const AttributeMetadata *>(attrOrProp);
StringRef name = namedAttr->attrName;
getPropMethod << formatv(R"decl(
{{
@@ -1513,7 +1515,8 @@ void OpEmitter::genPropertiesSupport() {
// syntax. This method verifies the constraint on the properties attributes
// before they are set, since dyn_cast<> will silently omit failures.
for (const auto &attrOrProp : attrOrProperties) {
- const auto *namedAttr = llvm::dyn_cast_if_present<const AttributeMetadata *>(attrOrProp);
+ const auto *namedAttr =
+ llvm::dyn_cast_if_present<const AttributeMetadata *>(attrOrProp);
if (!namedAttr || !namedAttr->constraint)
continue;
Attribute attr = *namedAttr->constraint;
@@ -2811,7 +2814,8 @@ void OpEmitter::buildParamList(SmallVectorImpl<MethodParameter> ¶mList,
// Calculate the start index from which we can attach default values in the
// builder declaration.
for (int i = op.getNumArgs() - 1; i >= 0; --i) {
- auto *namedAttr = llvm::dyn_cast_if_present<tblgen::NamedAttribute *>(op.getArg(i));
+ auto *namedAttr =
+ llvm::dyn_cast_if_present<tblgen::NamedAttribute *>(op.getArg(i));
if (!namedAttr || !namedAttr->attr.hasDefaultValue())
break;
@@ -2841,7 +2845,8 @@ void OpEmitter::buildParamList(SmallVectorImpl<MethodParameter> ¶mList,
for (int i = 0, e = op.getNumArgs(), numOperands = 0; i < e; ++i) {
Argument arg = op.getArg(i);
- if (const auto *operand = llvm::dyn_cast_if_present<NamedTypeConstraint *>(arg)) {
+ if (const auto *operand =
+ llvm::dyn_cast_if_present<NamedTypeConstraint *>(arg)) {
StringRef type;
if (operand->isVariadicOfVariadic())
type = "::llvm::ArrayRef<::mlir::ValueRange>";
@@ -3827,7 +3832,8 @@ OpOperandAdaptorEmitter::OpOperandAdaptorEmitter(
.addSubst("_storage", propertyStorage)));
continue;
}
- const auto *namedAttr = llvm::dyn_cast_if_present<const AttributeMetadata *>(attrOrProp);
+ const auto *namedAttr =
+ llvm::dyn_cast_if_present<const AttributeMetadata *>(attrOrProp);
const Attribute *attr = nullptr;
if (namedAttr->constraint)
attr = &*namedAttr->constraint;
More information about the Mlir-commits
mailing list