[llvm] c531d38 - [JITLink] Use DEBUG_WITH_TYPE, rather than defining DEBUG_TYPE.

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 18 20:41:56 PDT 2021


Author: Lang Hames
Date: 2021-10-18T20:41:49-07:00
New Revision: c531d3805d2b28a84f89cb482d7fba8dc1eb8d01

URL: https://github.com/llvm/llvm-project/commit/c531d3805d2b28a84f89cb482d7fba8dc1eb8d01
DIFF: https://github.com/llvm/llvm-project/commit/c531d3805d2b28a84f89cb482d7fba8dc1eb8d01.diff

LOG: [JITLink] Use DEBUG_WITH_TYPE, rather than defining DEBUG_TYPE.

This avoids defining DEBUG_TYPE in a public header.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/ExecutionEngine/JITLink/TableManager.h b/llvm/include/llvm/ExecutionEngine/JITLink/TableManager.h
index 315a35682acb..2b502397a8dd 100644
--- a/llvm/include/llvm/ExecutionEngine/JITLink/TableManager.h
+++ b/llvm/include/llvm/ExecutionEngine/JITLink/TableManager.h
@@ -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 @@ template <typename TableManagerImplT> class TableManager {
     // 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 @@ template <typename TableManagerImplT> class TableManager {
     }
 
     assert(EntryI != Entries.end() && "Could not get entry symbol");
-    LLVM_DEBUG({
+    DEBUG_WITH_TYPE("jitlink", {
       dbgs() << "    Using " << impl().getTableName() << " entry "
              << *EntryI->second << "\n";
     });


        


More information about the llvm-commits mailing list