[mlir] Fix gcc -std=c++17 compilation.

Ensure that `Handler` within the class is interpreted as the as the current template instantiation (instead the class template itself).

Fixes #53447

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D120852
This commit is contained in:
Michael Kruse 2022-03-03 08:57:22 -06:00
parent 942c03910a
commit 1c941d98f8
1 changed files with 4 additions and 2 deletions

View File

@ -193,7 +193,8 @@ template <typename... ParameterTs> class DebugAction {
public:
class Handler : public DebugActionManager::HandlerBase {
public:
Handler() : HandlerBase(TypeID::get<Handler>()) {}
Handler()
: HandlerBase(TypeID::get<DebugAction<ParameterTs...>::Handler>()) {}
/// This hook allows for controlling whether an action should execute or
/// not. `parameters` correspond to the set of values provided by the
@ -205,7 +206,8 @@ public:
/// Provide classof to allow casting between handler types.
static bool classof(const DebugActionManager::HandlerBase *handler) {
return handler->getHandlerID() == TypeID::get<Handler>();
return handler->getHandlerID() ==
TypeID::get<DebugAction<ParameterTs...>::Handler>();
}
};