diff options
Diffstat (limited to 'llvm/lib/Object/Archive.cpp')
| -rw-r--r-- | llvm/lib/Object/Archive.cpp | 8 | 
1 files changed, 8 insertions, 0 deletions
| diff --git a/llvm/lib/Object/Archive.cpp b/llvm/lib/Object/Archive.cpp index 3c9eda7..286e9ee 100644 --- a/llvm/lib/Object/Archive.cpp +++ b/llvm/lib/Object/Archive.cpp @@ -194,6 +194,14 @@ error_code Archive::Child::getAsBinary(OwningPtr<Binary> &Result) const {    return object_error::success;  } +ErrorOr<Archive*> Archive::create(MemoryBuffer *Source) { +  error_code EC; +  OwningPtr<Archive> Ret(new Archive(Source, EC)); +  if (EC) +    return EC; +  return Ret.take(); +} +  Archive::Archive(MemoryBuffer *source, error_code &ec)    : Binary(Binary::ID_Archive, source), SymbolTable(child_end()) {    // Check for sufficient magic. | 
