[JITLink] Use DEBUG_WITH_TYPE, rather than defining DEBUG_TYPE.
authorLang Hames <lhames@gmail.com>
Tue, 19 Oct 2021 01:53:05 +0000 (18:53 -0700)
committerLang Hames <lhames@gmail.com>
Tue, 19 Oct 2021 03:41:49 +0000 (20:41 -0700)
This avoids defining DEBUG_TYPE in a public header.

llvm/include/llvm/ExecutionEngine/JITLink/TableManager.h

index 315a356..2b50239 100644 (file)
@@ -16,8 +16,6 @@
 #include "llvm/ExecutionEngine/JITLink/JITLink.h"
 #include "llvm/Support/Debug.h"
 
-#define DEBUG_TYPE "jitlink"
-
 namespace llvm {
 namespace jitlink {
 
@@ -39,7 +37,7 @@ public:
     // Build the entry if it doesn't exist.
     if (EntryI == Entries.end()) {
       auto &Entry = impl().createEntry(G, Target);
-      LLVM_DEBUG({
+      DEBUG_WITH_TYPE("jitlink", {
         dbgs() << "    Created" << impl().getTableName() << "entry for "
                << Target.getName() << ": " << Entry << "\n";
       });
@@ -47,7 +45,7 @@ public:
     }
 
     assert(EntryI != Entries.end() && "Could not get entry symbol");
-    LLVM_DEBUG({
+    DEBUG_WITH_TYPE("jitlink", {
       dbgs() << "    Using " << impl().getTableName() << " entry "
              << *EntryI->second << "\n";
     });