llvm.org GIT mirror llvm / ded2b0d
Add explicit keywords, and fix a minor typo that they uncovered. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45034 91177308-0d34-0410-b5e6-96231b3b80d8 Dan Gohman 12 years ago
8 changed file(s) with 11 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
388388 template
389389 class StringMapIterator : public StringMapConstIterator {
390390 public:
391 StringMapIterator(StringMapImpl::ItemBucket *Bucket,
392 bool NoAdvance = false)
391 explicit StringMapIterator(StringMapImpl::ItemBucket *Bucket,
392 bool NoAdvance = false)
393393 : StringMapConstIterator(Bucket, NoAdvance) {
394394 }
395395 StringMapEntry &operator*() const {
247247 }
248248
249249 protected:
250 ExecutionEngine(ModuleProvider *P);
250 explicit ExecutionEngine(ModuleProvider *P);
251251
252252 void emitGlobals();
253253
3333 APInt IntVal; // also used for long doubles
3434
3535 GenericValue() : DoubleVal(0.0), IntVal(1,0) {}
36 GenericValue(void *V) : PointerVal(V), IntVal(1,0) { }
36 explicit GenericValue(void *V) : PointerVal(V), IntVal(1,0) { }
3737 };
3838
3939 inline GenericValue PTOGV(void *P) { return GenericValue(P); }
245245 // Used for work list prioritization.
246246 unsigned Timestamp;
247247
248 Node(bool direct = true) :
248 explicit Node(bool direct = true) :
249249 Val(0), Edges(0), PointsTo(0), OldPointsTo(0),
250250 PointerEquivLabel(0), LocationEquivLabel(0), PredEdges(0),
251251 ImplicitPredEdges(0), PointedToBy(0), NumInEdges(0),
2929 std::ostream &OS;
3030
3131 public:
32 Printer(std::ostream &OS = *cerr);
32 explicit Printer(std::ostream &OS = *cerr);
3333
3434 const char *getPassName() const;
3535 void getAnalysisUsage(AnalysisUsage &AU) const;
7171 std::vector *OutBuffer;
7272 size_t FnStart;
7373 public:
74 ELFCodeEmitter(ELFWriter &ew) : EW(ew), TM(EW.TM), OutBuffer(0) {}
74 explicit ELFCodeEmitter(ELFWriter &ew) : EW(ew), TM(EW.TM), OutBuffer(0) {}
7575
7676 void startFunction(MachineFunction &F);
7777 bool finishFunction(MachineFunction &F);
4747 ///
4848 struct CopyRecSort : public std::binary_function {
4949 JoinPriorityQueue *JPQ;
50 CopyRecSort(JoinPriorityQueue *jpq) : JPQ(jpq) {}
50 explicit CopyRecSort(JoinPriorityQueue *jpq) : JPQ(jpq) {}
5151 CopyRecSort(const CopyRecSort &RHS) : JPQ(RHS.JPQ) {}
5252 bool operator()(CopyRec left, CopyRec right) const;
5353 };
6060 std::priority_queue, SF> Queue;
6161
6262 public:
63 JoinPriorityQueue(SimpleRegisterCoalescing *rc) : Rc(rc), Queue(SF(this)) {}
63 explicit JoinPriorityQueue(SimpleRegisterCoalescing *rc)
64 : Rc(rc), Queue(SF(this)) {}
6465
6566 bool empty() const { return Queue.empty(); }
6667 void push(CopyRec R) { Queue.push(R); }
652652 // char *fgets(char *s, int n, FILE *stream);
653653 GenericValue lle_X_fgets(FunctionType *FT, const vector &Args) {
654654 assert(Args.size() == 3);
655 return GVTOP(fgets((char*)GVTOP(Args[0]), Args[1].IntVal.getZExtValue(),
655 return PTOGV(fgets((char*)GVTOP(Args[0]), Args[1].IntVal.getZExtValue(),
656656 getFILE(GVTOP(Args[2]))));
657657 }
658658