[clang] [CIR] [Upstream local initialization for ArrayType (PR #132974)
Andy Kaylor via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 25 17:59:12 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);
----------------
andykaylor wrote:
No auto here
https://github.com/llvm/llvm-project/pull/132974
More information about the cfe-commits
mailing list