rose: use dumpString for debug output

This commit is contained in:
Justin Viiret 2016-07-21 13:32:55 +10:00 committed by Matthew Barr
parent 04634f2e87
commit 55c2d20e2c
2 changed files with 6 additions and 6 deletions

View File

@ -750,7 +750,7 @@ unique_ptr<VertLitInfo> LitCollection::pickNext() {
for (auto v : lits.back()->vv) { for (auto v : lits.back()->vv) {
if (contains(poisoned, v)) { if (contains(poisoned, v)) {
DEBUG_PRINTF("skipping '%s' as overlapped\n", DEBUG_PRINTF("skipping '%s' as overlapped\n",
((const string &)*lits.back()->lit.begin()).c_str()); dumpString(*(lits.back()->lit.begin())).c_str());
lits.pop_back(); lits.pop_back();
goto next_lit; goto next_lit;
} }
@ -760,7 +760,7 @@ unique_ptr<VertLitInfo> LitCollection::pickNext() {
lits.pop_back(); lits.pop_back();
poisonCandidates(*rv); poisonCandidates(*rv);
DEBUG_PRINTF("best is '%s' %u a%d t%d\n", DEBUG_PRINTF("best is '%s' %u a%d t%d\n",
((const string &)*rv->lit.begin()).c_str(), dumpString(*(rv->lit.begin())).c_str(),
g[rv->vv.front()].index, g[rv->vv.front()].index,
(int)createsAnchoredLHS(g, rv->vv, depths, grey), (int)createsAnchoredLHS(g, rv->vv, depths, grey),
(int)createsTransientLHS(g, rv->vv, depths, grey)); (int)createsTransientLHS(g, rv->vv, depths, grey));
@ -815,7 +815,7 @@ u32 removeTrailingLiteralStates(NGHolder &g, const ue2_literal &lit,
max_delay--; max_delay--;
} }
DEBUG_PRINTF("killing off '%s'\n", ((const string &)lit).c_str()); DEBUG_PRINTF("killing off '%s'\n", dumpString(lit).c_str());
set<NFAVertex> curr, next; set<NFAVertex> curr, next;
curr.insert(g.accept); curr.insert(g.accept);
@ -892,7 +892,7 @@ u32 removeTrailingLiteralStates(NGHolder &g, const ue2_literal &lit,
void restoreTrailingLiteralStates(NGHolder &g, const ue2_literal &lit, void restoreTrailingLiteralStates(NGHolder &g, const ue2_literal &lit,
u32 delay, const vector<NFAVertex> &preds) { u32 delay, const vector<NFAVertex> &preds) {
assert(delay <= lit.length()); assert(delay <= lit.length());
DEBUG_PRINTF("adding on '%s' %u\n", ((const string &)lit).c_str(), delay); DEBUG_PRINTF("adding on '%s' %u\n", dumpString(lit).c_str(), delay);
NFAVertex prev = g.accept; NFAVertex prev = g.accept;
auto it = lit.rbegin(); auto it = lit.rbegin();
@ -1786,7 +1786,7 @@ bool doNetflowCut(RoseInGraph &ig, const vector<RoseInEdge> &to_cut,
cut_lits[e] = lits; cut_lits[e] = lits;
DEBUG_PRINTF("cut lit '%s'\n", DEBUG_PRINTF("cut lit '%s'\n",
((const string &)*cut_lits[e].begin()).c_str()); dumpString(*cut_lits[e].begin()).c_str());
} }
/* if literals are underlength bail or if it involves a forbidden edge*/ /* if literals are underlength bail or if it involves a forbidden edge*/

View File

@ -375,7 +375,7 @@ void createVertices(RoseBuildImpl *tbi,
/* ensure the holder does not accept any paths which do not end with lit */ /* ensure the holder does not accept any paths which do not end with lit */
static static
void removeFalsePaths(NGHolder &g, const ue2_literal &lit) { void removeFalsePaths(NGHolder &g, const ue2_literal &lit) {
DEBUG_PRINTF("strip '%s'\n", ((const string &)lit).c_str()); DEBUG_PRINTF("strip '%s'\n", dumpString(lit).c_str());
set<NFAVertex> curr, next; set<NFAVertex> curr, next;
curr.insert(g.accept); curr.insert(g.accept);
curr.insert(g.acceptEod); curr.insert(g.acceptEod);