llvm.org GIT mirror llvm / b5660dc
Add explicit keywords. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47382 91177308-0d34-0410-b5e6-96231b3b80d8 Dan Gohman 12 years ago
6 changed file(s) with 10 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
4242 unsigned ID;
4343
4444 AnnotationID(); // Default ctor is disabled
45 inline AnnotationID(unsigned i) : ID(i) {} // Only creatable from AnnMgr
45
46 // AnnotationID is only creatable from AnnMgr.
47 explicit inline AnnotationID(unsigned i) : ID(i) {}
4648 public:
4749 inline AnnotationID(const AnnotationID &A) : ID(A.ID) {}
4850
6668 AnnotationID ID; // ID number, as obtained from AnnotationManager
6769 Annotation *Next; // The next annotation in the linked list
6870 public:
69 inline Annotation(AnnotationID id) : ID(id), Next(0) {}
71 explicit inline Annotation(AnnotationID id) : ID(id), Next(0) {}
7072 virtual ~Annotation(); // Designed to be subclassed
7173
7274 // getID - Return the unique ID# of this annotation
13151315 // exit is called.
13161316 struct extrahelp {
13171317 const char * morehelp;
1318 extrahelp(const char* help);
1318 explicit extrahelp(const char* help);
13191319 };
13201320
13211321 void PrintVersionMessage();
4343 public:
4444 /// Initialize a full (the default) or empty set for the specified bit width.
4545 ///
46 ConstantRange(uint32_t BitWidth, bool isFullSet = true);
46 explicit ConstantRange(uint32_t BitWidth, bool isFullSet = true);
4747
4848 /// Initialize a range to hold the single specified value.
4949 ///
261261 public SelectionDAG::DAGUpdateListener {
262262 DAGCombiner &DC;
263263 public:
264 WorkListRemover(DAGCombiner &dc) : DC(dc) {}
264 explicit WorkListRemover(DAGCombiner &dc) : DC(dc) {}
265265
266266 virtual void NodeDeleted(SDNode *N) {
267267 DC.removeFromWorkList(N);
5656 IDMapType::iterator I = IDMap->find(Name);
5757 if (I == IDMap->end()) {
5858 (*IDMap)[Name] = IDCounter++; // Add a new element
59 return IDCounter-1;
59 return AnnotationID(IDCounter-1);
6060 }
61 return I->second;
61 return AnnotationID(I->second);
6262 }
6363
6464 // getID - Name -> ID + registration of a factory function for demand driven
11111111 else if (isa(V))
11121112 return ConstantRange(APInt::getNullValue(typeToWidth(V->getType())));
11131113 else
1114 return typeToWidth(V->getType());
1114 return ConstantRange(typeToWidth(V->getType()));
11151115 }
11161116
11171117 // typeToWidth - returns the number of bits necessary to store a value of