diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-11-27 05:38:50 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-11-27 05:38:50 +0000 |
commit | fbd25b7d1d030ca0cbea28c690b636c35299826e (patch) | |
tree | 230a7315cdda54afe65aca230af6f15b29862a2f /lib/Object | |
parent | 7976b88d9f415023e4ee498cb6d4a2d20532c873 (diff) |
MC/Mach-O: Start stubbing out a Mach-O object file wrapper.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120190 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Object')
-rw-r--r-- | lib/Object/CMakeLists.txt | 1 | ||||
-rw-r--r-- | lib/Object/MachOObject.cpp | 23 |
2 files changed, 24 insertions, 0 deletions
diff --git a/lib/Object/CMakeLists.txt b/lib/Object/CMakeLists.txt index 18ee4beac1..49c50ccd76 100644 --- a/lib/Object/CMakeLists.txt +++ b/lib/Object/CMakeLists.txt @@ -1,3 +1,4 @@ add_llvm_library(LLVMObject + MachOObject.cpp ObjectFile.cpp ) diff --git a/lib/Object/MachOObject.cpp b/lib/Object/MachOObject.cpp new file mode 100644 index 0000000000..59468633b1 --- /dev/null +++ b/lib/Object/MachOObject.cpp @@ -0,0 +1,23 @@ +//===- MachOObject.cpp - Mach-O Object File Wrapper -----------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "llvm/Object/MachOObject.h" +#include "llvm/Support/MemoryBuffer.h" + +using namespace llvm; +using namespace object; + +MachOObject::MachOObject(MemoryBuffer *Buffer_) : Buffer(Buffer_) { +} + +MachOObject *MachOObject::LoadFromBuffer(MemoryBuffer *Buffer, + std::string *ErrorStr) { + if (ErrorStr) *ErrorStr = ""; + return new MachOObject(Buffer); +} |