[Mlir-commits] [mlir] [mlir][llvmir] implement missing attrs `getChecked` (PR #121248)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Sat Dec 28 10:49:58 PST 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 092966a44d1793e6bd53c191efeb5a5425fecde3 d2515df82577237f969a1dd94bd26ab83500060b --extensions cpp -- mlir/lib/Dialect/LLVMIR/IR/LLVMAttrs.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/mlir/lib/Dialect/LLVMIR/IR/LLVMAttrs.cpp b/mlir/lib/Dialect/LLVMIR/IR/LLVMAttrs.cpp
index fe2adf361e..10d7b6b0d0 100644
--- a/mlir/lib/Dialect/LLVMIR/IR/LLVMAttrs.cpp
+++ b/mlir/lib/Dialect/LLVMIR/IR/LLVMAttrs.cpp
@@ -288,9 +288,10 @@ TargetFeaturesAttr TargetFeaturesAttr::get(MLIRContext *context,
                    }));
 }
 
-TargetFeaturesAttr TargetFeaturesAttr::getChecked(
-    function_ref<InFlightDiagnostic()> emitError,
-    MLIRContext *context, llvm::ArrayRef<StringRef> features) {
+TargetFeaturesAttr
+TargetFeaturesAttr::getChecked(function_ref<InFlightDiagnostic()> emitError,
+                               MLIRContext *context,
+                               llvm::ArrayRef<StringRef> features) {
   return Base::getChecked(emitError, context,
                           llvm::map_to_vector(features, [&](StringRef feature) {
                             return StringAttr::get(context, feature);
@@ -305,9 +306,9 @@ TargetFeaturesAttr TargetFeaturesAttr::get(MLIRContext *context,
   return get(context, features);
 }
 
-TargetFeaturesAttr TargetFeaturesAttr::getChecked(
-    function_ref<InFlightDiagnostic()> emitError,
-    MLIRContext *context, StringRef targetFeatures) {
+TargetFeaturesAttr
+TargetFeaturesAttr::getChecked(function_ref<InFlightDiagnostic()> emitError,
+                               MLIRContext *context, StringRef targetFeatures) {
   SmallVector<StringRef> features;
   targetFeatures.split(features, ',', /*MaxSplit=*/-1,
                        /*KeepEmpty=*/false);

``````````

</details>


https://github.com/llvm/llvm-project/pull/121248


More information about the Mlir-commits mailing list