TTG: pull dump helper into the template

This commit is contained in:
Ivan Krysak
2024-03-04 15:23:55 +01:00
committed by Alessandro Di Federico
parent 927e8006b9
commit 9e6bf29f74
34 changed files with 39 additions and 134 deletions
+2 -19
View File
@@ -291,14 +291,9 @@ bool ControlFlowGraph::verify(const model::Binary &Binary,
return true;
}
void ControlFlowGraph::dump() const {
::serialize(dbg, *this);
}
void ControlFlowGraph::dumpCFG(const model::Binary &Binary) const {
auto [Graph,
_] = buildControlFlowGraph<FunctionCFG>(Blocks(), Entry(), Binary);
WriteGraph(&Graph, "function-metadata");
auto [G, _] = buildControlFlowGraph<FunctionCFG>(Blocks(), Entry(), Binary);
WriteGraph(&G, "function-metadata");
}
bool FunctionEdgeBase::verify() const {
@@ -346,23 +341,11 @@ bool FunctionEdgeBase::verify(model::VerifyHelper &VH) const {
return true;
}
void FunctionEdgeBase::dump() const {
serialize(dbg, *this);
}
void CallEdge::dump() const {
serialize(dbg, *this);
}
model::Identifier BasicBlock::name() const {
using llvm::Twine;
return model::Identifier(std::string("bb_") + ID().toString());
}
void BasicBlock::dump() const {
serialize(dbg, *this);
}
bool BasicBlock::verify() const {
return verify(false);
}