/// to be fixed up so that the address points to atom Y's address.
class COFFReference LLVM_FINAL : public Reference {
public:
- COFFReference(Kind kind) : _target(nullptr), _offsetInAtom(0) {
+ explicit COFFReference(Kind kind) : _target(nullptr), _offsetInAtom(0) {
_kind = kind;
}
class ReaderCOFF : public Reader {
public:
- ReaderCOFF(const TargetInfo &ti) : Reader(ti), _readerArchive(ti, *this) {}
+ explicit ReaderCOFF(const TargetInfo &ti)
+ : Reader(ti), _readerArchive(ti, *this) {}
error_code parseFile(std::unique_ptr<MemoryBuffer> &mb,
std::vector<std::unique_ptr<File> > &result) const {
kindSection
};
- Chunk(Kind kind) : _kind(kind), _size(0), _align(1) {}
+ explicit Chunk(Kind kind) : _kind(kind), _size(0), _align(1) {}
virtual ~Chunk() {};
virtual void write(uint8_t *fileBuffer) = 0;
/// A PEHeaderChunk represents PE header including COFF header.
class PEHeaderChunk : public HeaderChunk {
public:
- PEHeaderChunk(const PECOFFTargetInfo &targetInfo) : HeaderChunk() {
+ explicit PEHeaderChunk(const PECOFFTargetInfo &targetInfo) : HeaderChunk() {
// Set the size of the chunk and initialize the header with null bytes.
_size = sizeof(llvm::COFF::PEMagic) + sizeof(_coffHeader)
+ sizeof(_peHeader);
}
public:
- ExecutableWriter(const PECOFFTargetInfo &targetInfo)
+ explicit ExecutableWriter(const PECOFFTargetInfo &targetInfo)
: _PECOFFTargetInfo(targetInfo) {}
// Create all chunks that consist of the output file.