//===---- ObjectBuffer.h - Utility class to wrap object image memory -----===//
//
-// The LLVM Compiler Infrastructure
+// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
#ifndef LLVM_EXECUTIONENGINE_OBJECTBUFFER_H
#define LLVM_EXECUTIONENGINE_OBJECTBUFFER_H
-#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/raw_ostream.h"
protected:
// The memory contained in an ObjectBuffer
- OwningPtr<MemoryBuffer> Buffer;
+ std::unique_ptr<MemoryBuffer> Buffer;
};
/// ObjectBufferStream - This class encapsulates the SmallVector and
/// while providing a common ObjectBuffer interface for access to the
/// memory once the object has been generated.
class ObjectBufferStream : public ObjectBuffer {
- virtual void anchor();
+ void anchor() override;
public:
ObjectBufferStream() : OS(SV) {}
virtual ~ObjectBufferStream() {}
// Make the data accessible via the ObjectBuffer::Buffer
Buffer.reset(MemoryBuffer::getMemBuffer(StringRef(SV.data(), SV.size()),
- "",
- false));
+ "",
+ false));
}
protected:
SmallVector<char, 4096> SV; // Working buffer into which we JIT.
- raw_svector_ostream OS; // streaming wrapper
+ raw_svector_ostream OS; // streaming wrapper
};
} // namespace llvm