summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/lib/Support/StreamableMemoryObject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm/lib/Support/StreamableMemoryObject.cpp')
-rw-r--r--contrib/llvm/lib/Support/StreamableMemoryObject.cpp23
1 files changed, 11 insertions, 12 deletions
diff --git a/contrib/llvm/lib/Support/StreamableMemoryObject.cpp b/contrib/llvm/lib/Support/StreamableMemoryObject.cpp
index 2ed7c5c..5cb0680 100644
--- a/contrib/llvm/lib/Support/StreamableMemoryObject.cpp
+++ b/contrib/llvm/lib/Support/StreamableMemoryObject.cpp
@@ -10,6 +10,7 @@
#include "llvm/Support/StreamableMemoryObject.h"
#include "llvm/Support/Compiler.h"
#include <cassert>
+#include <cstddef>
#include <cstring>
@@ -24,20 +25,18 @@ public:
assert(LastChar >= FirstChar && "Invalid start/end range");
}
- virtual uint64_t getBase() const LLVM_OVERRIDE { return 0; }
- virtual uint64_t getExtent() const LLVM_OVERRIDE {
+ uint64_t getBase() const override { return 0; }
+ uint64_t getExtent() const override {
return LastChar - FirstChar;
}
- virtual int readByte(uint64_t address, uint8_t* ptr) const LLVM_OVERRIDE;
- virtual int readBytes(uint64_t address,
- uint64_t size,
- uint8_t *buf) const LLVM_OVERRIDE;
- virtual const uint8_t *getPointer(uint64_t address,
- uint64_t size) const LLVM_OVERRIDE;
- virtual bool isValidAddress(uint64_t address) const LLVM_OVERRIDE {
+ int readByte(uint64_t address, uint8_t* ptr) const override;
+ int readBytes(uint64_t address, uint64_t size,
+ uint8_t *buf) const override;
+ const uint8_t *getPointer(uint64_t address, uint64_t size) const override;
+ bool isValidAddress(uint64_t address) const override {
return validAddress(address);
}
- virtual bool isObjectEnd(uint64_t address) const LLVM_OVERRIDE {
+ bool isObjectEnd(uint64_t address) const override {
return objectEnd(address);
}
@@ -48,10 +47,10 @@ private:
// These are implemented as inline functions here to avoid multiple virtual
// calls per public function
bool validAddress(uint64_t address) const {
- return static_cast<ptrdiff_t>(address) < LastChar - FirstChar;
+ return static_cast<std::ptrdiff_t>(address) < LastChar - FirstChar;
}
bool objectEnd(uint64_t address) const {
- return static_cast<ptrdiff_t>(address) == LastChar - FirstChar;
+ return static_cast<std::ptrdiff_t>(address) == LastChar - FirstChar;
}
RawMemoryObject(const RawMemoryObject&) LLVM_DELETED_FUNCTION;
OpenPOWER on IntegriCloud