Check that a file is not a directory before reading it into a MemoryBuffer.
[oota-llvm.git] / lib / Support / MemoryObject.cpp
index c82f46ae79439ae38dddacd42a9f5fee45b6f0f5..b20ab8923813215845aa1a517505b95ddc319cd2 100644 (file)
@@ -16,7 +16,7 @@ MemoryObject::~MemoryObject() {
 int MemoryObject::readBytes(uint64_t address,
                             uint64_t size,
                             uint8_t* buf,
-                            uint64_t* copied) {
+                            uint64_t* copied) const {
   uint64_t current = address;
   uint64_t limit = getBase() + getExtent();