llvm.org GIT mirror llvm / adf3eab
Add explicit keywords. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44234 91177308-0d34-0410-b5e6-96231b3b80d8 Dan Gohman 12 years ago
6 changed file(s) with 17 addition(s) and 16 deletion(s). Raw diff Collapse all Expand all
2727 class StringMapEntryBase {
2828 unsigned StrLen;
2929 public:
30 StringMapEntryBase(unsigned Len) : StrLen(Len) {}
30 explicit StringMapEntryBase(unsigned Len) : StrLen(Len) {}
3131
3232 unsigned getKeyLength() const { return StrLen; }
3333 };
5454 unsigned NumTombstones;
5555 unsigned ItemSize;
5656 protected:
57 StringMapImpl(unsigned itemSize) : ItemSize(itemSize) {
57 explicit StringMapImpl(unsigned itemSize) : ItemSize(itemSize) {
5858 // Initialize the map with zero buckets to allocation.
5959 TheTable = 0;
6060 NumBuckets = 0;
114114 class StringMapEntry : public StringMapEntryBase {
115115 ValueTy Val;
116116 public:
117 StringMapEntry(unsigned StrLen)
117 explicit StringMapEntry(unsigned StrLen)
118118 : StringMapEntryBase(StrLen), Val() {}
119119 StringMapEntry(unsigned StrLen, const ValueTy &V)
120120 : StringMapEntryBase(StrLen), Val(V) {}
203203 typedef StringMapEntry MapEntryTy;
204204 public:
205205 StringMap() : StringMapImpl(sizeof(MapEntryTy)) {}
206 StringMap(unsigned InitialSize)
206 explicit StringMap(unsigned InitialSize)
207207 : StringMapImpl(InitialSize, sizeof(MapEntryTy)) {}
208208
209209 AllocatorTy &getAllocator() { return Allocator; }
313313 protected:
314314 StringMapImpl::ItemBucket *Ptr;
315315 public:
316 StringMapConstIterator(StringMapImpl::ItemBucket *Bucket,
317 bool NoAdvance = false)
316 explicit StringMapConstIterator(StringMapImpl::ItemBucket *Bucket,
317 bool NoAdvance = false)
318318 : Ptr(Bucket) {
319319 if (!NoAdvance) AdvancePastEmptyBuckets();
320320 }
284284 class SCEVAddExpr : public SCEVCommutativeExpr {
285285 friend class ScalarEvolution;
286286
287 SCEVAddExpr(const std::vector &ops)
287 explicit SCEVAddExpr(const std::vector &ops)
288288 : SCEVCommutativeExpr(scAddExpr, ops) {
289289 }
290290
304304 class SCEVMulExpr : public SCEVCommutativeExpr {
305305 friend class ScalarEvolution;
306306
307 SCEVMulExpr(const std::vector &ops)
307 explicit SCEVMulExpr(const std::vector &ops)
308308 : SCEVCommutativeExpr(scMulExpr, ops) {
309309 }
310310
467467 friend class ScalarEvolution;
468468
469469 Value *V;
470 SCEVUnknown(Value *v) : SCEV(scUnknown), V(v) {}
470 explicit SCEVUnknown(Value *v) : SCEV(scUnknown), V(v) {}
471471
472472 protected:
473473 ~SCEVUnknown();
3030 MapTy PtrMap;
3131
3232 public:
33 Serializer(BitstreamWriter& stream);
33 explicit Serializer(BitstreamWriter& stream);
3434 ~Serializer();
3535
3636 template
122122 void operator=(const ConstantPlaceHolder &); // DO NOT IMPLEMENT
123123 public:
124124 Use Op;
125 ConstantPlaceHolder(const Type *Ty)
125 explicit ConstantPlaceHolder(const Type *Ty)
126126 : ConstantExpr(Ty, Instruction::UserOp1, &Op, 1),
127127 Op(UndefValue::get(Type::Int32Ty), this) {
128128 }
1919 std::ostream &Out; // ostream to print on
2020 public:
2121 static char ID; // Pass identifcation, replacement for typeid
22 WriteBitcodePass(std::ostream &o) : ModulePass((intptr_t) &ID), Out(o) {}
22 explicit WriteBitcodePass(std::ostream &o)
23 : ModulePass((intptr_t) &ID), Out(o) {}
2324
2425 const char *getPassName() const { return "Bitcode Writer"; }
2526
5656 Value *Val; // Relation to what value?
5757 unsigned Rel; // SetCC or ICmp relation, or Add if no information
5858 public:
59 Relation(Value *V) : Val(V), Rel(Instruction::Add) {}
59 explicit Relation(Value *V) : Val(V), Rel(Instruction::Add) {}
6060 bool operator<(const Relation &R) const { return Val < R.Val; }
6161 Value *getValue() const { return Val; }
6262 unsigned getRelation() const { return Rel; }
111111 //
112112 Value *Replacement;
113113 public:
114 ValueInfo(const Type *Ty)
114 explicit ValueInfo(const Type *Ty)
115115 : Bounds(Ty->isInteger() ? cast(Ty)->getBitWidth() : 32),
116116 Replacement(0) {}
117117
145145 return *I;
146146
147147 // Insert and return the new relationship...
148 return *Relationships.insert(I, V);
148 return *Relationships.insert(I, Relation(V));
149149 }
150150
151151 const Relation *requestRelation(Value *V) const {
175175 typedef std::map ValueMapTy;
176176 ValueMapTy ValueMap;
177177 public:
178 RegionInfo(BasicBlock *bb) : BB(bb) {}
178 explicit RegionInfo(BasicBlock *bb) : BB(bb) {}
179179
180180 // getEntryBlock - Return the block that dominates all of the members of
181181 // this region.