bool printBlockTerminator = true);
void printOperation(Operation *op);
- void printGenericOp(Operation *op);
+ void printGenericOp(Operation *op) override;
// Implement OpAsmPrinter.
- raw_ostream &getStream() const { return os; }
- void printType(Type type) { ModulePrinter::printType(type); }
- void printAttribute(Attribute attr) { ModulePrinter::printAttribute(attr); }
- void printAttributeAndType(Attribute attr) {
+ raw_ostream &getStream() const override { return os; }
+ void printType(Type type) override { ModulePrinter::printType(type); }
+ void printAttribute(Attribute attr) override {
+ ModulePrinter::printAttribute(attr);
+ }
+ void printAttributeAndType(Attribute attr) override {
ModulePrinter::printAttributeAndType(attr);
}
- void printFunctionReference(Function *func) {
+ void printFunctionReference(Function *func) override {
return ModulePrinter::printFunctionReference(func);
}
- void printOperand(Value *value) { printValueID(value); }
+ void printOperand(Value *value) override { printValueID(value); }
void printOptionalAttrDict(ArrayRef<NamedAttribute> attrs,
- ArrayRef<StringRef> elidedAttrs = {}) {
+ ArrayRef<StringRef> elidedAttrs = {}) override {
return ModulePrinter::printOptionalAttrDict(attrs, elidedAttrs);
};
/// Parse a function name like '@foo' and return the name in a form that can
/// be passed to resolveFunctionName when a function type is available.
- virtual ParseResult parseFunctionName(StringRef &result, llvm::SMLoc &loc) {
+ ParseResult parseFunctionName(StringRef &result, llvm::SMLoc &loc) override {
if (parseOptionalFunctionName(result, loc))
return emitError(loc, "expected function name");
return success();
}
/// Resolve a parse function name and a type into a function reference.
- virtual ParseResult resolveFunctionName(StringRef name, FunctionType type,
- llvm::SMLoc loc, Function *&result) {
+ ParseResult resolveFunctionName(StringRef name, FunctionType type,
+ llvm::SMLoc loc, Function *&result) override {
result = parser.resolveFunctionReference(name, loc, type);
return failure(result == nullptr);
}
/// Parse a region argument. Region arguments define new values, so this also
/// checks if the values with the same name has not been defined yet. The
/// type of the argument will be resolved later by a call to `parseRegion`.
- ParseResult parseRegionArgument(OperandType &argument) {
+ ParseResult parseRegionArgument(OperandType &argument) override {
// Use parseOperand to fill in the OperandType structure.
if (parseOperand(argument))
return failure();