diff --git a/mlir/include/mlir/Support/DebugAction.h b/mlir/include/mlir/Support/DebugAction.h --- a/mlir/include/mlir/Support/DebugAction.h +++ b/mlir/include/mlir/Support/DebugAction.h @@ -90,7 +90,7 @@ /// Register the given action handler with the manager. void registerActionHandler(std::unique_ptr handler) { // The manager is always disabled if built without debug. -#ifndef NDEBUG +#if LLVM_ENABLE_ABI_BREAKING_CHECKS actionHandlers.emplace_back(std::move(handler)); #endif } @@ -109,7 +109,7 @@ template bool shouldExecute(Args &&... args) { // The manager is always disabled if built without debug. -#ifdef NDEBUG +#if !LLVM_ENABLE_ABI_BREAKING_CHECKS return true; #else // Invoke the `shouldExecute` method on the provided handler. @@ -127,7 +127,7 @@ private: // The manager is always disabled if built without debug. -#ifndef NDEBUG +#if LLVM_ENABLE_ABI_BREAKING_CHECKS //===--------------------------------------------------------------------===// // Query to Handler Dispatch //===--------------------------------------------------------------------===//