@@ -39,23 +39,23 @@ class StreamableMemoryObject : public MemoryObject {
39
39
// / getBase - Returns the lowest valid address in the region.
40
40
// /
41
41
// / @result - The lowest valid address.
42
- virtual uint64_t getBase () const override = 0;
42
+ uint64_t getBase () const override = 0;
43
43
44
44
// / getExtent - Returns the size of the region in bytes. (The region is
45
45
// / contiguous, so the highest valid address of the region
46
46
// / is getBase() + getExtent() - 1).
47
47
// / May block until all bytes in the stream have been read
48
48
// /
49
49
// / @result - The size of the region.
50
- virtual uint64_t getExtent () const override = 0;
50
+ uint64_t getExtent () const override = 0;
51
51
52
52
// / readByte - Tries to read a single byte from the region.
53
53
// / May block until (address - base) bytes have been read
54
54
// / @param address - The address of the byte, in the same space as getBase().
55
55
// / @param ptr - A pointer to a byte to be filled in. Must be non-NULL.
56
56
// / @result - 0 if successful; -1 if not. Failure may be due to a
57
57
// / bounds violation or an implementation-specific error.
58
- virtual int readByte (uint64_t address, uint8_t *ptr) const override = 0;
58
+ int readByte (uint64_t address, uint8_t *ptr) const override = 0;
59
59
60
60
// / readBytes - Tries to read a contiguous range of bytes from the
61
61
// / region, up to the end of the region.
@@ -71,9 +71,8 @@ class StreamableMemoryObject : public MemoryObject {
71
71
// / and large enough to hold size bytes.
72
72
// / @result - 0 if successful; -1 if not. Failure may be due to a
73
73
// / bounds violation or an implementation-specific error.
74
- virtual int readBytes (uint64_t address,
75
- uint64_t size,
76
- uint8_t *buf) const override = 0;
74
+ int readBytes (uint64_t address, uint64_t size,
75
+ uint8_t *buf) const override = 0;
77
76
78
77
// / getPointer - Ensures that the requested data is in memory, and returns
79
78
// / A pointer to it. More efficient than using readBytes if the
@@ -106,23 +105,21 @@ class StreamableMemoryObject : public MemoryObject {
106
105
class StreamingMemoryObject : public StreamableMemoryObject {
107
106
public:
108
107
StreamingMemoryObject (DataStreamer *streamer);
109
- virtual uint64_t getBase () const override { return 0 ; }
110
- virtual uint64_t getExtent () const override ;
111
- virtual int readByte (uint64_t address, uint8_t *ptr) const override ;
112
- virtual int readBytes (uint64_t address,
113
- uint64_t size,
114
- uint8_t *buf) const override ;
115
- virtual const uint8_t *getPointer (uint64_t address,
116
- uint64_t size) const override {
108
+ uint64_t getBase () const override { return 0 ; }
109
+ uint64_t getExtent () const override ;
110
+ int readByte (uint64_t address, uint8_t *ptr) const override ;
111
+ int readBytes (uint64_t address, uint64_t size,
112
+ uint8_t *buf) const override ;
113
+ const uint8_t *getPointer (uint64_t address, uint64_t size) const override {
117
114
// This could be fixed by ensuring the bytes are fetched and making a copy,
118
115
// requiring that the bitcode size be known, or otherwise ensuring that
119
116
// the memory doesn't go away/get reallocated, but it's
120
117
// not currently necessary. Users that need the pointer don't stream.
121
118
assert (0 && " getPointer in streaming memory objects not allowed" );
122
119
return NULL ;
123
120
}
124
- virtual bool isValidAddress (uint64_t address) const override ;
125
- virtual bool isObjectEnd (uint64_t address) const override ;
121
+ bool isValidAddress (uint64_t address) const override ;
122
+ bool isObjectEnd (uint64_t address) const override ;
126
123
127
124
// / Drop s bytes from the front of the stream, pushing the positions of the
128
125
// / remaining bytes down by s. This is used to skip past the bitcode header,
0 commit comments