forked from OSchip/llvm-project
[mlir][OpInterfaceGen] Emit the utility Trait decl as a class and not using directive
This fixes the build on MSVC where it is unable to handle template-template using directives properly.
This commit is contained in:
parent
8539588783
commit
ac2aaa3788
|
@ -179,9 +179,10 @@ static void emitTraitDecl(OpInterface &interface, raw_ostream &os,
|
||||||
|
|
||||||
os << " };\n";
|
os << " };\n";
|
||||||
|
|
||||||
// Emit a utility using directive for the trait class.
|
// Emit a utility wrapper trait class.
|
||||||
os << " template <typename ConcreteOp>\n "
|
os << " template <typename ConcreteOp>\n "
|
||||||
<< llvm::formatv("using Trait = {0}Trait<ConcreteOp>;\n", interfaceName);
|
<< llvm::formatv("struct Trait : public {0}Trait<ConcreteOp> {{};\n",
|
||||||
|
interfaceName);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void emitInterfaceDecl(OpInterface &interface, raw_ostream &os) {
|
static void emitInterfaceDecl(OpInterface &interface, raw_ostream &os) {
|
||||||
|
|
Loading…
Reference in New Issue