[clang] [CIR] [Upstream local initialization for ArrayType (PR #132974)
Amr Hesham via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 26 04:24:59 PDT 2025
================
@@ -620,6 +684,28 @@ mlir::LogicalResult CIRToLLVMStoreOpLowering::matchAndRewrite(
return mlir::LogicalResult::success();
}
+/// Switches on the type of attribute and calls the appropriate conversion.
+mlir::Value lowerCirAttrAsValue(mlir::Operation *parentOp,
+ const mlir::Attribute attr,
+ mlir::ConversionPatternRewriter &rewriter,
+ const mlir::TypeConverter *converter,
+ mlir::DataLayout const &dataLayout) {
+ CIRAttrToValue valueConverter(parentOp, rewriter, converter);
+ auto value = valueConverter.visit(attr);
+ if (!value)
+ llvm_unreachable("unhandled attribute type");
----------------
AmrDeveloper wrote:
We don't have access to `errorNYI` function, maybe we can add a MissingFeature for NYI implemented Attribute type in general
https://github.com/llvm/llvm-project/pull/132974
More information about the cfe-commits
mailing list