diff --git a/mlir/lib/IR/Dialect.cpp b/mlir/lib/IR/Dialect.cpp index f84fe8915707..952619b4477a 100644 --- a/mlir/lib/IR/Dialect.cpp +++ b/mlir/lib/IR/Dialect.cpp @@ -19,7 +19,7 @@ #include "llvm/ADT/MapVector.h" #include "llvm/ADT/SmallVectorExtras.h" #include "llvm/ADT/Twine.h" -#include "llvm/Support/Debug.h" +#include "llvm/Support/DebugLog.h" #include "llvm/Support/Regex.h" #include @@ -104,14 +104,8 @@ void Dialect::addInterface(std::unique_ptr interface) { auto it = registeredInterfaces.try_emplace(interface->getID(), std::move(interface)); - (void)it; - LLVM_DEBUG({ - if (!it.second) { - llvm::dbgs() << "[" DEBUG_TYPE - "] repeated interface registration for dialect " - << getNamespace(); - } - }); + if (!it.second) + LDBG() << "repeated interface registration for dialect " << getNamespace(); } //===----------------------------------------------------------------------===//