aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Object/Archive.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Object/Archive.h')
-rw-r--r--include/llvm/Object/Archive.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/include/llvm/Object/Archive.h b/include/llvm/Object/Archive.h
index 1cba519..4fae76f 100644
--- a/include/llvm/Object/Archive.h
+++ b/include/llvm/Object/Archive.h
@@ -17,6 +17,7 @@
#include "llvm/ADT/StringRef.h"
#include "llvm/Object/Binary.h"
#include "llvm/Support/ErrorHandling.h"
+#include "llvm/Support/ErrorOr.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/MemoryBuffer.h"
@@ -90,8 +91,13 @@ public:
error_code getMemoryBuffer(OwningPtr<MemoryBuffer> &Result,
bool FullPath = false) const;
+ error_code getMemoryBuffer(std::unique_ptr<MemoryBuffer> &Result,
+ bool FullPath = false) const;
- error_code getAsBinary(OwningPtr<Binary> &Result) const;
+ error_code getAsBinary(OwningPtr<Binary> &Result,
+ LLVMContext *Context = 0) const;
+ error_code getAsBinary(std::unique_ptr<Binary> &Result,
+ LLVMContext *Context = 0) const;
};
class child_iterator {
@@ -163,6 +169,7 @@ public:
};
Archive(MemoryBuffer *source, error_code &ec);
+ static ErrorOr<Archive *> create(MemoryBuffer *Source);
enum Kind {
K_GNU,
@@ -174,11 +181,11 @@ public:
return Format;
}
- child_iterator begin_children(bool SkipInternal = true) const;
- child_iterator end_children() const;
+ child_iterator child_begin(bool SkipInternal = true) const;
+ child_iterator child_end() const;
- symbol_iterator begin_symbols() const;
- symbol_iterator end_symbols() const;
+ symbol_iterator symbol_begin() const;
+ symbol_iterator symbol_end() const;
// Cast methods.
static inline bool classof(Binary const *v) {