Skip to content

Commit df69c0e

Browse files
alexmalyshevfacebook-github-bot
authored andcommitted
More context in CopyGraph JIT_CHECK error
Summary: Making it even more explicit as to what is going on. Reviewed By: yoney Differential Revision: D81537113 fbshipit-source-id: bdaa9b2cf975b6fbc72b39badabdc25d58d8256e
1 parent c3319ac commit df69c0e

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

cinderx/Jit/codegen/copy_graph.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,14 @@ CopyGraph::Node::~Node() {
1616
void CopyGraph::addEdge(int from, int to) {
1717
auto parent = getNode(from);
1818
auto child = getNode(to);
19-
JIT_CHECK(child->parent == nullptr, "child already has a parent");
19+
JIT_CHECK(
20+
child->parent == nullptr,
21+
"Trying to add CopyGraph edge {} -> {}, but there already exists {} -> "
22+
"{}",
23+
from,
24+
to,
25+
child->parent->loc,
26+
to);
2027
setParent(child, parent);
2128
}
2229

0 commit comments

Comments
 (0)