template<class T>
class FoldingSetIterator : public FoldingSetIteratorImpl {
public:
- FoldingSetIterator(void **Bucket) : FoldingSetIteratorImpl(Bucket) {}
+ explicit FoldingSetIterator(void **Bucket) : FoldingSetIteratorImpl(Bucket) {}
T &operator*() const {
return *static_cast<T*>(NodePtr);
protected:
void *Ptr;
- FoldingSetBucketIteratorImpl(void **Bucket);
+ explicit FoldingSetBucketIteratorImpl(void **Bucket);
FoldingSetBucketIteratorImpl(void **Bucket, bool)
: Ptr(reinterpret_cast<void*>(Bucket)) {}
template<class T>
class FoldingSetBucketIterator : public FoldingSetBucketIteratorImpl {
public:
- FoldingSetBucketIterator(void **Bucket) :
+ explicit FoldingSetBucketIterator(void **Bucket) :
FoldingSetBucketIteratorImpl(Bucket) {}
FoldingSetBucketIterator(void **Bucket, bool) :
class FoldingSetNodeWrapper : public FoldingSetNode {
T data;
public:
- FoldingSetNodeWrapper(const T& x) : data(x) {}
+ explicit FoldingSetNodeWrapper(const T& x) : data(x) {}
virtual ~FoldingSetNodeWrapper() {}
template<typename A1>
private:
friend class LoopInfoBase<BlockT>;
- LoopBase(BlockT *BB) : ParentLoop(0) {
+ explicit LoopBase(BlockT *BB) : ParentLoop(0) {
Blocks.push_back(BB);
}
};
bool Started; // Has this time variable ever been started?
TimerGroup *TG; // The TimerGroup this Timer is in.
public:
- Timer(const std::string &N);
+ explicit Timer(const std::string &N);
Timer(const std::string &N, TimerGroup &tg);
Timer(const Timer &T);
~Timer();
Timer &T;
TimeRegion(const TimeRegion &); // DO NOT IMPLEMENT
public:
- TimeRegion(Timer &t) : T(t) {
+ explicit TimeRegion(Timer &t) : T(t) {
T.startTimer();
}
~TimeRegion() {
/// is primarily used for debugging and for hunting performance problems.
///
struct NamedRegionTimer : public TimeRegion {
- NamedRegionTimer(const std::string &Name);
+ explicit NamedRegionTimer(const std::string &Name);
};
unsigned NumTimers;
std::vector<Timer> TimersToPrint;
public:
- TimerGroup(const std::string &name) : Name(name), NumTimers(0) {}
+ explicit TimerGroup(const std::string &name) : Name(name), NumTimers(0) {}
~TimerGroup() {
assert(NumTimers == 0 &&
"TimerGroup destroyed before all contained timers!");
class BasicInliner {
public:
- BasicInliner(TargetData *T = NULL);
+ explicit BasicInliner(TargetData *T = NULL);
~BasicInliner();
/// addFunction - Add function into the list of functions to process.
}
public:
-
- SelectionDAGLegalize(SelectionDAG &DAG);
+ explicit SelectionDAGLegalize(SelectionDAG &DAG);
/// getTypeAction - Return how we should legalize values of this type, either
/// it is already legal or we need to expand it into multiple registers of
public SelectionDAG::DAGUpdateListener {
DAGTypeLegalizer &DTL;
public:
- NodeUpdateListener(DAGTypeLegalizer &dtl) : DTL(dtl) {}
+ explicit NodeUpdateListener(DAGTypeLegalizer &dtl) : DTL(dtl) {}
virtual void NodeDeleted(SDNode *N, SDNode *E) {
assert(N->getNodeId() != DAGTypeLegalizer::Processed &&
const ARMSubtarget *Subtarget;
public:
- ARMDAGToDAGISel(ARMTargetMachine &TM)
+ explicit ARMDAGToDAGISel(ARMTargetMachine &TM)
: SelectionDAGISel(Lowering), Lowering(TM),
Subtarget(&TM.getSubtarget<ARMSubtarget>()) {
}
unsigned GlobalBaseReg;
public:
- SPUDAGToDAGISel(SPUTargetMachine &tm) :
+ explicit SPUDAGToDAGISel(SPUTargetMachine &tm) :
SelectionDAGISel(*tm.getTargetLowering()),
TM(tm),
SPUtli(*tm.getTargetLowering())
IA64TargetLowering IA64Lowering;
unsigned GlobalBaseReg;
public:
- IA64DAGToDAGISel(IA64TargetMachine &TM)
+ explicit IA64DAGToDAGISel(IA64TargetMachine &TM)
: SelectionDAGISel(IA64Lowering), IA64Lowering(*TM.getTargetLowering()) {}
virtual bool runOnFunction(Function &Fn) {
const MipsSubtarget &Subtarget;
public:
- MipsDAGToDAGISel(MipsTargetMachine &tm) : SelectionDAGISel(MipsLowering),
+ explicit MipsDAGToDAGISel(MipsTargetMachine &tm) :
+ SelectionDAGISel(MipsLowering),
TM(tm), MipsLowering(*TM.getTargetLowering()),
Subtarget(tm.getSubtarget<MipsSubtarget>()) {}
PIC16TargetLowering PIC16Lowering;
public:
- PIC16DAGToDAGISel(PIC16TargetMachine &tm) :
+ explicit PIC16DAGToDAGISel(PIC16TargetMachine &tm) :
SelectionDAGISel(PIC16Lowering),
TM(tm), PIC16Lowering(*TM.getTargetLowering()) {}
const PPCSubtarget &PPCSubTarget;
unsigned GlobalBaseReg;
public:
- PPCDAGToDAGISel(PPCTargetMachine &tm)
+ explicit PPCDAGToDAGISel(PPCTargetMachine &tm)
: SelectionDAGISel(PPCLowering), TM(tm),
PPCLowering(*TM.getTargetLowering()),
PPCSubTarget(*TM.getSubtargetImpl()) {}
/// make the right decision when generating code for different targets.
const SparcSubtarget &Subtarget;
public:
- SparcDAGToDAGISel(TargetMachine &TM)
+ explicit SparcDAGToDAGISel(TargetMachine &TM)
: SelectionDAGISel(Lowering), Lowering(TM),
Subtarget(TM.getSubtarget<SparcSubtarget>()) {
}
template <typename T>
struct VISIBILITY_HIDDEN LeakDetectorImpl {
- LeakDetectorImpl(const char* const name) : Cache(0), Name(name) { }
+ explicit LeakDetectorImpl(const char* const name) : Cache(0), Name(name) { }
// Because the most common usage pattern, by far, is to add a
// garbage object, then remove it immediately, we optimize this
namespace {
struct BuiltinIntegerType : public IntegerType {
- BuiltinIntegerType(unsigned W) : IntegerType(W) {}
+ explicit BuiltinIntegerType(unsigned W) : IntegerType(W) {}
};
}
const IntegerType *Type::Int1Ty = new BuiltinIntegerType(1);
class BitsRecTy : public RecTy {
unsigned Size;
public:
- BitsRecTy(unsigned Sz) : Size(Sz) {}
+ explicit BitsRecTy(unsigned Sz) : Size(Sz) {}
unsigned getNumBits() const { return Size; }
class ListRecTy : public RecTy {
RecTy *Ty;
public:
- ListRecTy(RecTy *T) : Ty(T) {}
+ explicit ListRecTy(RecTy *T) : Ty(T) {}
RecTy *getElementType() const { return Ty; }
class RecordRecTy : public RecTy {
Record *Rec;
public:
- RecordRecTy(Record *R) : Rec(R) {}
+ explicit RecordRecTy(Record *R) : Rec(R) {}
Record *getRecord() const { return Rec; }
std::vector<Record*> SuperClasses;
public:
- Record(const std::string &N) : Name(N) {}
+ explicit Record(const std::string &N) : Name(N) {}
~Record() {}
const std::string &getName() const { return Name; }