Skip to content

Commit d35535f

Browse files
committed
Revert "[MLIR][emitc]: Remove unused functions (NFC)"
This reverts commit c4f8da9.
1 parent 673bc2b commit d35535f

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

mlir/lib/Dialect/EmitC/IR/EmitC.cpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,6 +1043,27 @@ LogicalResult emitc::VerbatimOp::verify() {
10431043
return success();
10441044
}
10451045

1046+
[[maybe_unused]] static ParseResult
1047+
parseVariadicTypeFmtArgs(AsmParser &p, SmallVector<Type> &params) {
1048+
Type type;
1049+
if (p.parseType(type))
1050+
return failure();
1051+
1052+
params.push_back(type);
1053+
while (succeeded(p.parseOptionalComma())) {
1054+
if (p.parseType(type))
1055+
return failure();
1056+
params.push_back(type);
1057+
}
1058+
1059+
return success();
1060+
}
1061+
1062+
[[maybe_unused]] static void printVariadicTypeFmtArgs(AsmPrinter &p,
1063+
ArrayRef<Type> params) {
1064+
llvm::interleaveComma(params, p, [&](Type type) { p.printType(type); });
1065+
}
1066+
10461067
FailureOr<SmallVector<ReplacementItem>> emitc::VerbatimOp::parseFormatString() {
10471068
// Error checking is done in verify.
10481069
return ::parseFormatString(getValue(), getFmtArgs());

0 commit comments

Comments
 (0)