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:
Alessandro Di Federico
2018-09-26 21:17:39 +02:00
parent cf8d6d530e
commit 43cf36bfce
33 changed files with 572 additions and 522 deletions
+2 -2
View File
@@ -52,7 +52,7 @@ static RegisterPass<StackAnalysis<false>> Y("sab",
template<bool AnalyzeABI>
bool StackAnalysis<AnalyzeABI>::runOnFunction(Function &F) {
DBG("passes", { dbg << "Starting StackAnalysis\n"; });
revng_log(PassesLog, "Starting StackAnalysis");
auto &GCBI = getAnalysis<GeneratedCodeBasicInfo>();
const Module *M = F.getParent();
@@ -131,7 +131,7 @@ bool StackAnalysis<AnalyzeABI>::runOnFunction(Function &F) {
GrandResult.dump(M, Output);
TextRepresentation = Output.str();
DBG("passes", { dbg << "Ending StackAnalysis\n"; });
revng_log(PassesLog, "Ending StackAnalysis");
return false;
}