This method adds a debug info attribute to an operation.
| 603 | |
| 604 | /// This method adds a debug info attribute to an operation. |
| 605 | void addDebugInfo(uint64_t opIndex, Attribute attr) { |
| 606 | // Nothing to do if the operation has a reserved index. |
| 607 | if (opIndex < static_cast<uint64_t>(Bytecode::DebugReserved::SIZE)) |
| 608 | return; |
| 609 | |
| 610 | // Adjust the index to account for reserved indices. |
| 611 | opIndex -= static_cast<uint64_t>(Bytecode::DebugReserved::SIZE); |
| 612 | |
| 613 | if (opIndex >= debuginfoIndices.size()) |
| 614 | debuginfoIndices.resize(opIndex + 1); |
| 615 | debuginfoIndices[opIndex].push_back(getDebugInfoIndex(attr)); |
| 616 | } |
| 617 | |
| 618 | // debuginfo-section =: |
| 619 | // diOpsNum[varint] // Total number of operations with debug info |
no test coverage detected