BinaryReader.h revision 533eae20118036f425f27bf0536ef0ccbb090b65
1//===- BinaryReader.h -----------------------------------------------------===// 2// 3// The MCLinker Project 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9#ifndef MCLD_LD_BINARYREADER_H 10#define MCLD_LD_BINARYREADER_H 11#include "mcld/LD/LDReader.h" 12#include <llvm/Support/system_error.h> 13 14namespace mcld { 15 16class Module; 17class Input; 18 19/** \class BinaryReader 20 * \brief BinaryReader provides an common interface for different Binary 21 * formats. 22 */ 23class BinaryReader : public LDReader 24{ 25public: 26 virtual ~BinaryReader() = 0; 27 28 virtual bool isMyFormat(Input& pInput, bool &pContinue) const 29 { pContinue = true; return false; } 30 31 virtual bool readBinary(Input& pFile) = 0; 32}; 33 34} // namespace of mcld 35 36#endif 37 38