Skip to content

Commit 6445a75

Browse files
authored
[MLIR] Update MLIRContext to use the LDBG() style debug macro (NFC) (#154619)
1 parent ffbc8da commit 6445a75

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

mlir/lib/IR/MLIRContext.cpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#include "llvm/Support/Allocator.h"
3131
#include "llvm/Support/CommandLine.h"
3232
#include "llvm/Support/Compiler.h"
33-
#include "llvm/Support/Debug.h"
33+
#include "llvm/Support/DebugLog.h"
3434
#include "llvm/Support/ManagedStatic.h"
3535
#include "llvm/Support/Mutex.h"
3636
#include "llvm/Support/RWMutex.h"
@@ -455,8 +455,7 @@ MLIRContext::getOrLoadDialect(StringRef dialectNamespace, TypeID dialectID,
455455
auto dialectIt = impl.loadedDialects.try_emplace(dialectNamespace, nullptr);
456456

457457
if (dialectIt.second) {
458-
LLVM_DEBUG(llvm::dbgs()
459-
<< "Load new dialect in Context " << dialectNamespace << "\n");
458+
LDBG() << "Load new dialect in Context " << dialectNamespace;
460459
#ifndef NDEBUG
461460
if (impl.multiThreadedExecutionContext != 0)
462461
llvm::report_fatal_error(
@@ -525,8 +524,7 @@ DynamicDialect *MLIRContext::getOrLoadDynamicDialect(
525524
"' has already been registered");
526525
}
527526

528-
LLVM_DEBUG(llvm::dbgs() << "Load new dynamic dialect in Context "
529-
<< dialectNamespace << "\n");
527+
LDBG() << "Load new dynamic dialect in Context " << dialectNamespace;
530528
#ifndef NDEBUG
531529
if (impl.multiThreadedExecutionContext != 0)
532530
llvm::report_fatal_error(
@@ -1192,11 +1190,10 @@ willBeValidAffineMap(unsigned dimCount, unsigned symbolCount,
11921190
getMaxDimAndSymbol(ArrayRef<ArrayRef<AffineExpr>>(results), maxDimPosition,
11931191
maxSymbolPosition);
11941192
if ((maxDimPosition >= dimCount) || (maxSymbolPosition >= symbolCount)) {
1195-
LLVM_DEBUG(
1196-
llvm::dbgs()
1193+
LDBG()
11971194
<< "maximum dimensional identifier position in result expression must "
11981195
"be less than `dimCount` and maximum symbolic identifier position "
1199-
"in result expression must be less than `symbolCount`\n");
1196+
"in result expression must be less than `symbolCount`";
12001197
return false;
12011198
}
12021199
return true;

0 commit comments

Comments
 (0)