Propagate the debug info of `nodes` in function `func` to the `target` node. If the debug info of any node is missing, its node name and function name is used.
| 1702 | // If the debug info of any node is missing, its node name and function name |
| 1703 | // is used. |
| 1704 | void PropagateDebugInfoToNode(const string& func, |
| 1705 | const std::vector<const Node*>& nodes, |
| 1706 | NodeDef* target) { |
| 1707 | if (nodes.empty() || target->has_experimental_debug_info()) { |
| 1708 | return; |
| 1709 | } |
| 1710 | for (const Node* node : nodes) { |
| 1711 | const auto& node_def = node->def(); |
| 1712 | if (node_def.has_experimental_debug_info()) { |
| 1713 | target->mutable_experimental_debug_info()->MergeFrom( |
| 1714 | node_def.experimental_debug_info()); |
| 1715 | } else { |
| 1716 | target->mutable_experimental_debug_info()->add_original_node_names( |
| 1717 | node_def.name()); |
| 1718 | target->mutable_experimental_debug_info()->add_original_func_names(func); |
| 1719 | } |
| 1720 | } |
| 1721 | } |
| 1722 | } // namespace |
| 1723 | |
| 1724 | string InlineFunctionBodyOptions::DebugString() const { |
no test coverage detected