[Object] Modify OwningBinary's interface to separate inspection from ownership.

The getBinary and getBuffer method now return ordinary pointers of appropriate
const-ness. Ownership is transferred by calling takeBinary(), which returns a
pair of the Binary and a MemoryBuffer.

llvm-svn: 221003
This commit is contained in:
Lang Hames
2014-10-31 21:37:49 +00:00
parent fca26da446
commit f04de6ec48
6 changed files with 29 additions and 22 deletions

View File

@@ -485,7 +485,7 @@ ObjectFileCoverageMappingReader::ObjectFileCoverageMappingReader(
}
std::error_code ObjectFileCoverageMappingReader::readHeader() {
ObjectFile *OF = Object.getBinary().get();
const ObjectFile *OF = Object.getBinary();
if (!OF)
return getError();
auto BytesInAddress = OF->getBytesInAddress();