summaryrefslogtreecommitdiff
path: root/lib/Object/ObjectFile.cpp
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2011-06-13 11:12:33 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2011-06-13 11:12:33 +0000
commit69aec36f9b3129ba6eb83d64cde31c3d86d6d39a (patch)
treea468d532d46c8162fc06923870f52084012085ee /lib/Object/ObjectFile.cpp
parentfc9ec691da995e7894490a80f5b6b65daf5e34d3 (diff)
downloadllvm-69aec36f9b3129ba6eb83d64cde31c3d86d6d39a.tar.gz
llvm-69aec36f9b3129ba6eb83d64cde31c3d86d6d39a.tar.bz2
llvm-69aec36f9b3129ba6eb83d64cde31c3d86d6d39a.tar.xz
Make Binary the parent of ObjectFile and update children to new interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132911 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Object/ObjectFile.cpp')
-rw-r--r--lib/Object/ObjectFile.cpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/lib/Object/ObjectFile.cpp b/lib/Object/ObjectFile.cpp
index 47b63115a9..a7798df33f 100644
--- a/lib/Object/ObjectFile.cpp
+++ b/lib/Object/ObjectFile.cpp
@@ -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) {