static inline unsigned char streamer_read_uchar (struct lto_input_block *ib) { if (ib->p >= ib->len) lto_section_overrun (ib); return (ib->data[ib->p++]); }
unsigned HOST_WIDE_INT streamer_read_uhwi (struct lto_input_block *ib) { unsigned HOST_WIDE_INT result; int shift; unsigned HOST_WIDE_INT byte; unsigned int p = ib->p; unsigned int len = ib->len; const char *data = ib->data; result = data[p++]; if ((result & 0x80) != 0) { result &= 0x7f; shift = 7; do { byte = data[p++]; result |= (byte & 0x7f) << shift; shift += 7; } while ((byte & 0x80) != 0); } /* We check for section overrun after the fact for performance reason. */ if (p > len) lto_section_overrun (ib); ib->p = p; return result; }