Make Binary the parent of ObjectFile and update children to new interface.

llvm-svn: 132911
This commit is contained in:
Michael J. Spencer
2011-06-13 11:12:33 +00:00
parent 7dc3c3de7e
commit a7f9c49aab
9 changed files with 222 additions and 170 deletions

View File

@@ -21,18 +21,8 @@
using namespace llvm;
using namespace object;
ObjectFile::ObjectFile(MemoryBuffer *Object)
: MapFile(Object) {
assert(MapFile && "Must be a valid MemoryBuffer!");
base = reinterpret_cast<const uint8_t *>(MapFile->getBufferStart());
}
ObjectFile::~ObjectFile() {
delete MapFile;
}
StringRef ObjectFile::getFilename() const {
return MapFile->getBufferIdentifier();
ObjectFile::ObjectFile(unsigned int Type, MemoryBuffer *source, error_code &ec)
: Binary(Type, source) {
}
ObjectFile *ObjectFile::createObjectFile(MemoryBuffer *Object) {