[Mlir-commits] [mlir] [mlir][EmitC] Expand the MemRefToEmitC pass - Lowering `CopyOp` (PR #151206)
Gil Rapaport
llvmlistbot at llvm.org
Thu Jul 31 07:37:14 PDT 2025
================
@@ -76,12 +87,14 @@ struct ConvertMemRefToEmitCPass
}
mlir::OpBuilder builder(module.getBody(), module.getBody()->begin());
- StringAttr includeAttr =
- builder.getStringAttr(options.lowerToCpp ? cppStandardLibraryHeader
- : cStandardLibraryHeader);
- builder.create<mlir::emitc::IncludeOp>(
- module.getLoc(), includeAttr,
- /*is_standard_include=*/builder.getUnitAttr());
+ StringRef headerName;
+ if (callOp.getCallee() == memcpyFunctionName)
+ headerName = stringLibraryHeader;
----------------
aniragil wrote:
Why not follow the C/C++ distinction as with stdlib, i.e. cstring vs string.h?
https://github.com/llvm/llvm-project/pull/151206
More information about the Mlir-commits
mailing list