mirror of https://github.com/llvm/circt.git
[RTL] remove redundant error in type parser.
This also fixes a clang tidy issue I introduced in a previous patch.
This commit is contained in:
parent
b8bdfed633
commit
5305cfbaaa
|
@ -19,7 +19,7 @@ class DialectAsmPrinter;
|
|||
namespace circt {
|
||||
namespace rtl {
|
||||
using Location = ::mlir::Location;
|
||||
}
|
||||
} // namespace rtl
|
||||
} // namespace circt
|
||||
|
||||
#define GET_TYPEDEF_CLASSES
|
||||
|
|
|
@ -83,12 +83,7 @@ Type RTLDialect::parseType(DialectAsmParser &parser) const {
|
|||
llvm::StringRef mnemonic;
|
||||
if (parser.parseKeyword(&mnemonic))
|
||||
return Type();
|
||||
auto genType = generatedTypeParser(getContext(), parser, mnemonic);
|
||||
if (genType)
|
||||
return genType;
|
||||
parser.emitError(parser.getCurrentLocation(), "Could not parse rtl.")
|
||||
<< mnemonic << ".";
|
||||
return Type();
|
||||
return generatedTypeParser(getContext(), parser, mnemonic);
|
||||
}
|
||||
|
||||
/// Print a type registered to this dialect. Try the tblgen'd type printer
|
||||
|
|
|
@ -67,12 +67,10 @@ rtl.module @B() {
|
|||
|
||||
// -----
|
||||
|
||||
// expected-error @+2 {{rtl.array only supports one dimension}}
|
||||
// expected-error @+1 {{Could not parse rtl.array}}
|
||||
// expected-error @+1 {{rtl.array only supports one dimension}}
|
||||
func @arrayDims(%a: !rtl.array<3 x 4 x i5>) { }
|
||||
|
||||
// -----
|
||||
|
||||
// expected-error @+2 {{invalid element for rtl.inout type}}
|
||||
// expected-error @+1 {{Could not parse rtl.inout}}
|
||||
// expected-error @+1 {{invalid element for rtl.inout type}}
|
||||
func @invalidInout(%arg0: !rtl.inout<tensor<*xf32>>) { }
|
Loading…
Reference in New Issue