mirror of
https://github.com/revng/revng
synced 2026-06-21 14:07:57 +00:00
Introduce revng_log and abandon DBG(...)
This commit introduces `revng_log`, a macro analagous to `revng_assert`, which basically allows to have the benefit of the `Logger` class without having to compute the expression to log if the logger is disabled. This commit also completely dismisses the `DBG` macro, converting all the old code to `Logger` + `revng_log`.
This commit is contained in:
@@ -25,7 +25,7 @@ using RegisterGCBI = RegisterPass<GeneratedCodeBasicInfo>;
|
||||
static RegisterGCBI X("gcbi", "Generated Code Basic Info", true, true);
|
||||
|
||||
bool GeneratedCodeBasicInfo::runOnFunction(llvm::Function &F) {
|
||||
DBG("passes", { dbg << "Starting GeneratedCodeBasicInfo\n"; });
|
||||
revng_log(PassesLog, "Starting GeneratedCodeBasicInfo");
|
||||
|
||||
Module *M = F.getParent();
|
||||
const char *MDName = "revamb.input.architecture";
|
||||
@@ -76,7 +76,7 @@ bool GeneratedCodeBasicInfo::runOnFunction(llvm::Function &F) {
|
||||
revng_assert(Dispatcher != nullptr && AnyPC != nullptr
|
||||
&& UnexpectedPC != nullptr);
|
||||
|
||||
DBG("passes", { dbg << "Ending GeneratedCodeBasicInfo\n"; });
|
||||
revng_log(PassesLog, "Ending GeneratedCodeBasicInfo");
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user