StringRefMemoryObject(StringRef bytes) : Bytes(bytes) {}
uint64_t getBase() const { return 0; }
- uint64_t getExtent() { return Bytes.size(); }
+ uint64_t getExtent() const { return Bytes.size(); }
- int readByte(uint64_t Addr, uint8_t *Byte) {
+ int readByte(uint64_t Addr, uint8_t *Byte) const {
if (Addr >= getExtent())
return -1;
*Byte = Bytes[Addr];