[JITLink] Use DEBUG_WITH_TYPE, rather than defining DEBUG_TYPE.

This avoids defining DEBUG_TYPE in a public header.
This commit is contained in:
Lang Hames 2021-10-18 18:53:05 -07:00
parent e678c51177
commit c531d3805d
1 changed files with 2 additions and 4 deletions

View 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";
});