Fix interface trait declaration in SymbolInterfaces.td

41d4aa7de6 introduced incorrect code in
extraTraitClassDeclaration: `this` refers to the trait class and not the
operation class so `->getContext()` is not valid. Use `$_op` instead.
This commit is contained in:
Alex Zinenko 2021-08-30 11:13:19 +02:00
parent 7b0d59da9a
commit 9db95a67d1

View file

@ -205,7 +205,7 @@ def Symbol : OpInterface<"SymbolOpInterface"> {
/// Convenience version of `setName` that take a StringRef.
void setName(StringRef name) {
setName(StringAttr::get(this->getContext(), name));
setName(StringAttr::get($_op->getContext(), name));
}
}];
}