Reads a type index using the provided reader and retrieves the corresponding Type. Emits an error and returns a null Type on failure.
| 535 | /// Reads a type index using the provided reader and retrieves the |
| 536 | /// corresponding Type. Emits an error and returns a null Type on failure. |
| 537 | Type readAndGetType(EncodingReader &reader) { |
| 538 | uint64_t typeIndex; |
| 539 | if (failed(reader.readVarInt(typeIndex))) { |
| 540 | return Type(); |
| 541 | } |
| 542 | // getType already emits an error if the index is bad or parsing fails. |
| 543 | return getType(typeIndex); |
| 544 | } |
| 545 | |
| 546 | private: |
| 547 | // All type deserialization is now auto-generated - see |
no test coverage detected