| 277 | } |
| 278 | |
| 279 | unsigned lineNumberFromNode(NodeInstance& inst) { |
| 280 | // TODO: cache these, they're kinda expensive to make |
| 281 | auto lineAssoc = inst.module().createLineNumberAssoc(); |
| 282 | auto lineNumberIter = lineAssoc.right.find(&inst); |
| 283 | if (lineNumberIter == lineAssoc.right.end()) { return -1; } |
| 284 | |
| 285 | return lineNumberIter->second; |
| 286 | } |
| 287 | |
| 288 | } // namespace chi |
no test coverage detected