aboutsummaryrefslogtreecommitdiff
path: root/include/lld/Core/Writer.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/lld/Core/Writer.h')
-rw-r--r--include/lld/Core/Writer.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/include/lld/Core/Writer.h b/include/lld/Core/Writer.h
index 8214ed6203f2..216f934916bc 100644
--- a/include/lld/Core/Writer.h
+++ b/include/lld/Core/Writer.h
@@ -11,25 +11,24 @@
#define LLD_CORE_WRITER_H
#include "lld/Core/LLVM.h"
+#include "llvm/Support/Error.h"
#include <memory>
#include <vector>
namespace lld {
-class ELFLinkingContext;
class File;
class LinkingContext;
class MachOLinkingContext;
-class PECOFFLinkingContext;
/// \brief The Writer is an abstract class for writing object files, shared
-/// library files, and executable files. Each file format (e.g. ELF, mach-o,
-/// PECOFF, etc) have a concrete subclass of Writer.
+/// library files, and executable files. Each file format (e.g. mach-o, etc)
+/// has a concrete subclass of Writer.
class Writer {
public:
virtual ~Writer();
/// \brief Write a file from the supplied File object
- virtual std::error_code writeFile(const File &linkedFile, StringRef path) = 0;
+ virtual llvm::Error writeFile(const File &linkedFile, StringRef path) = 0;
/// \brief This method is called by Core Linking to give the Writer a chance
/// to add file format specific "files" to set of files to be linked. This is
@@ -41,9 +40,7 @@ protected:
Writer();
};
-std::unique_ptr<Writer> createWriterELF(const ELFLinkingContext &);
std::unique_ptr<Writer> createWriterMachO(const MachOLinkingContext &);
-std::unique_ptr<Writer> createWriterPECOFF(const PECOFFLinkingContext &);
std::unique_ptr<Writer> createWriterYAML(const LinkingContext &);
} // end namespace lld