Revert the last two commits in the series. r132911, r132912.

llvm-svn: 132913
This commit is contained in:
Michael J. Spencer
2011-06-13 11:53:31 +00:00
parent 902695c488
commit aa41981dd8
9 changed files with 175 additions and 227 deletions

View File

@@ -21,8 +21,18 @@
using namespace llvm;
using namespace object;
ObjectFile::ObjectFile(unsigned int Type, MemoryBuffer *source, error_code &ec)
: Binary(Type, source) {
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::createObjectFile(MemoryBuffer *Object) {