summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object/ObjectFile.cpp
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2011-06-25 17:54:50 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2011-06-25 17:54:50 +0000
commitec29b121ff2981544137a9076b5882b53d17a34a (patch)
tree40415d8bff59aacf2dcbc02a3b34d3fef2929ce8 /llvm/lib/Object/ObjectFile.cpp
parentb02c95d43ef3926275cf4ba2886880ff008c6792 (diff)
downloadbcm5719-llvm-ec29b121ff2981544137a9076b5882b53d17a34a.tar.gz
bcm5719-llvm-ec29b121ff2981544137a9076b5882b53d17a34a.zip
Make Binary the parent of ObjectFile and update children to new interface.
llvm-svn: 133870
Diffstat (limited to 'llvm/lib/Object/ObjectFile.cpp')
-rw-r--r--llvm/lib/Object/ObjectFile.cpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/llvm/lib/Object/ObjectFile.cpp b/llvm/lib/Object/ObjectFile.cpp
index 47b63115a94..a7798df33fe 100644
--- a/llvm/lib/Object/ObjectFile.cpp
+++ b/llvm/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) {
OpenPOWER on IntegriCloud