[Mlir-commits] [mlir] [mlir][python] Improve sanitization of python names (PR #68801)
Oleksandr Alex Zinenko
llvmlistbot at llvm.org
Wed Oct 11 09:40:26 PDT 2023
================
@@ -1008,16 +1010,16 @@ static void emitValueBuilder(const Operator &op,
auto lhs = *llvm::split(arg, "=").begin();
return (lhs + "=" + llvm::convertToSnakeFromCamelCase(lhs)).str();
});
- os << llvm::formatv(
- valueBuilderTemplate,
- // Drop dialect name and then sanitize again (to catch e.g. func.return).
- sanitizeName(llvm::join(++splitName.begin(), splitName.end(), "_")),
- op.getCppClassName(), llvm::join(valueBuilderParams, ", "),
- llvm::join(opBuilderArgs, ", "),
- (op.getNumResults() > 1
- ? "_Sequence[_ods_ir.OpResult]"
- : (op.getNumResults() > 0 ? "_ods_ir.OpResult"
- : "_ods_ir.Operation")));
+ auto name_without_dialect =
----------------
ftynse wrote:
Nit: please expand auto unless the type is obvious from local context.
https://github.com/llvm/llvm-project/pull/68801
More information about the Mlir-commits
mailing list