blob: 0c487231f12a460be82ea9e3beeedab0d95f68e2 [file] [log] [blame]
//===- ObjectWriter.h -----------------------------------------------------===//
//
// The MCLinker Project
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef MCLD_OBJECT_WRITER_INTERFACE_H
#define MCLD_OBJECT_WRITER_INTERFACE_H
#ifdef ENABLE_UNITTEST
#include <gtest.h>
#endif
#include <llvm/Support/system_error.h>
namespace mcld
{
class Output;
class GNULDBackend;
/** \class ObjectWriter
* \brief ObjectWriter provides a common interface for object file writers.
*/
class ObjectWriter
{
protected:
ObjectWriter(GNULDBackend& pBackend);
public:
virtual ~ObjectWriter();
virtual llvm::error_code writeObject(Output& pOutput) = 0;
};
} // namespace of mcld
#endif