From 1c941d98f832002d054f4afcef60d75062226263 Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Thu, 3 Mar 2022 08:57:22 -0600 Subject: [PATCH] [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 --- mlir/include/mlir/Support/DebugAction.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mlir/include/mlir/Support/DebugAction.h b/mlir/include/mlir/Support/DebugAction.h index aa7a820873b3..82cd08ee72c3 100644 --- a/mlir/include/mlir/Support/DebugAction.h +++ b/mlir/include/mlir/Support/DebugAction.h @@ -193,7 +193,8 @@ template class DebugAction { public: class Handler : public DebugActionManager::HandlerBase { public: - Handler() : HandlerBase(TypeID::get()) {} + Handler() + : HandlerBase(TypeID::get::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(); + return handler->getHandlerID() == + TypeID::get::Handler>(); } };