mirror of
https://github.com/intel/llvm.git
synced 2026-01-26 21:53:12 +08:00
Allow the use of the $cppClass template variable in verifier code blocks.
PiperOrigin-RevId: 263378198
This commit is contained in:
committed by
A. Unique TensorFlower
parent
4f10c9b1ce
commit
ae9ec43e46
@@ -1141,10 +1141,14 @@ void OpEmitter::genVerifier() {
|
||||
|
||||
genRegionVerifier(body);
|
||||
|
||||
if (hasCustomVerify)
|
||||
body << codeInit->getValue() << "\n";
|
||||
else
|
||||
if (hasCustomVerify) {
|
||||
FmtContext fctx;
|
||||
fctx.addSubst("cppClass", opClass.getClassName());
|
||||
auto printer = codeInit->getValue().ltrim().rtrim(" \t\v\f\r");
|
||||
body << " " << tgfmt(printer, &fctx);
|
||||
} else {
|
||||
body << " return mlir::success();\n";
|
||||
}
|
||||
}
|
||||
|
||||
void OpEmitter::genOperandResultVerifier(OpMethodBody &body,
|
||||
|
||||
Reference in New Issue
Block a user