Be a bit more consistent about using ErrorOr when constructing Binary objects.
[oota-llvm.git] / include / llvm / Object / Archive.h
index 22c45ccac2be5cfd6ba97d0409bc83c790c15e0a..ce9391e8f0fc775dd75bc36c4c9f2e5f65b79ec5 100644 (file)
@@ -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"
 
@@ -163,6 +164,7 @@ public:
   };
 
   Archive(MemoryBuffer *source, error_code &ec);
+  static ErrorOr<Archive *> create(MemoryBuffer *Source);
 
   enum Kind {
     K_GNU,