forked from OSchip/llvm-project
Add "explicit" to ctors where appropriate.
llvm-svn: 185517
This commit is contained in:
parent
afa4844d94
commit
6c7ac57235
|
@ -30,7 +30,7 @@ using llvm::object::coff_symbol;
|
||||||
/// to be fixed up so that the address points to atom Y's address.
|
/// to be fixed up so that the address points to atom Y's address.
|
||||||
class COFFReference LLVM_FINAL : public Reference {
|
class COFFReference LLVM_FINAL : public Reference {
|
||||||
public:
|
public:
|
||||||
COFFReference(Kind kind) : _target(nullptr), _offsetInAtom(0) {
|
explicit COFFReference(Kind kind) : _target(nullptr), _offsetInAtom(0) {
|
||||||
_kind = kind;
|
_kind = kind;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -351,7 +351,8 @@ private:
|
||||||
|
|
||||||
class ReaderCOFF : public Reader {
|
class ReaderCOFF : public Reader {
|
||||||
public:
|
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,
|
error_code parseFile(std::unique_ptr<MemoryBuffer> &mb,
|
||||||
std::vector<std::unique_ptr<File> > &result) const {
|
std::vector<std::unique_ptr<File> > &result) const {
|
||||||
|
|
|
@ -67,7 +67,7 @@ public:
|
||||||
kindSection
|
kindSection
|
||||||
};
|
};
|
||||||
|
|
||||||
Chunk(Kind kind) : _kind(kind), _size(0), _align(1) {}
|
explicit Chunk(Kind kind) : _kind(kind), _size(0), _align(1) {}
|
||||||
virtual ~Chunk() {};
|
virtual ~Chunk() {};
|
||||||
virtual void write(uint8_t *fileBuffer) = 0;
|
virtual void write(uint8_t *fileBuffer) = 0;
|
||||||
|
|
||||||
|
@ -131,7 +131,7 @@ private:
|
||||||
/// A PEHeaderChunk represents PE header including COFF header.
|
/// A PEHeaderChunk represents PE header including COFF header.
|
||||||
class PEHeaderChunk : public HeaderChunk {
|
class PEHeaderChunk : public HeaderChunk {
|
||||||
public:
|
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.
|
// Set the size of the chunk and initialize the header with null bytes.
|
||||||
_size = sizeof(llvm::COFF::PEMagic) + sizeof(_coffHeader)
|
_size = sizeof(llvm::COFF::PEMagic) + sizeof(_coffHeader)
|
||||||
+ sizeof(_peHeader);
|
+ sizeof(_peHeader);
|
||||||
|
@ -585,7 +585,7 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ExecutableWriter(const PECOFFTargetInfo &targetInfo)
|
explicit ExecutableWriter(const PECOFFTargetInfo &targetInfo)
|
||||||
: _PECOFFTargetInfo(targetInfo) {}
|
: _PECOFFTargetInfo(targetInfo) {}
|
||||||
|
|
||||||
// Create all chunks that consist of the output file.
|
// Create all chunks that consist of the output file.
|
||||||
|
|
Loading…
Reference in New Issue