llvm.org GIT mirror llvm / c063502
Warning fixes for VC++, contributed by Morten Ofstad! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17831 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 15 years ago
7 changed file(s) with 14 addition(s) and 14 deletion(s). Raw diff Collapse all Expand all
120120 inline reverse_iterator rend () { return InstList.rend(); }
121121 inline const_reverse_iterator rend () const { return InstList.rend(); }
122122
123 inline unsigned size() const { return InstList.size(); }
123 inline size_t size() const { return InstList.size(); }
124124 inline bool empty() const { return InstList.empty(); }
125125 inline const Instruction &front() const { return InstList.front(); }
126126 inline Instruction &front() { return InstList.front(); }
139139 /// getNumParams - Return the number of fixed parameters this function type
140140 /// requires. This does not consider varargs.
141141 ///
142 unsigned getNumParams() const { return ContainedTys.size()-1; }
142 unsigned getNumParams() const { return (unsigned)ContainedTys.size()-1; }
143143
144144 // Implement the AbstractTypeUser interface.
145145 virtual void refineAbstractType(const DerivedType *OldTy, const Type *NewTy);
205205 element_iterator element_end() const { return ContainedTys.end(); }
206206
207207 // Random access to the elements
208 unsigned getNumElements() const { return ContainedTys.size(); }
208 unsigned getNumElements() const { return (unsigned)ContainedTys.size(); }
209209 const Type *getElementType(unsigned N) const {
210210 assert(N < ContainedTys.size() && "Element number out of range!");
211211 return ContainedTys[N];
167167 reverse_iterator rend () { return BasicBlocks.rend(); }
168168 const_reverse_iterator rend () const { return BasicBlocks.rend(); }
169169
170 unsigned size() const { return BasicBlocks.size(); }
170 size_t size() const { return BasicBlocks.size(); }
171171 bool empty() const { return BasicBlocks.empty(); }
172172 const BasicBlock &front() const { return BasicBlocks.front(); }
173173 BasicBlock &front() { return BasicBlocks.front(); }
187187 reverse_aiterator arend () { return ArgumentList.rend(); }
188188 const_reverse_aiterator arend () const { return ArgumentList.rend(); }
189189
190 unsigned asize() const { return ArgumentList.size(); }
190 size_t asize() const { return ArgumentList.size(); }
191191 bool aempty() const { return ArgumentList.empty(); }
192192 const Argument &afront() const { return ArgumentList.front(); }
193193 Argument &afront() { return ArgumentList.front(); }
274274 : Instruction((static_cast(&EPI)->getType()),
275275 GetElementPtr) {
276276 Operands.reserve(EPI.Operands.size());
277 for (unsigned i = 0, E = EPI.Operands.size(); i != E; ++i)
277 for (unsigned i = 0, E = (unsigned)EPI.Operands.size(); i != E; ++i)
278278 Operands.push_back(Use(EPI.Operands[i], this));
279279 }
280280 void init(Value *Ptr, const std::vector &Idx);
711711
712712 /// getNumIncomingValues - Return the number of incoming edges
713713 ///
714 unsigned getNumIncomingValues() const { return Operands.size()/2; }
714 unsigned getNumIncomingValues() const { return (unsigned)Operands.size()/2; }
715715
716716 /// getIncomingValue - Return incoming value #x
717717 ///
993993 /// getNumCases - return the number of 'cases' in this switch instruction.
994994 /// Note that case #0 is always the default case.
995995 unsigned getNumCases() const {
996 return Operands.size()/2;
996 return (unsigned)Operands.size()/2;
997997 }
998998
999999 /// getCaseValue - Return the specified case value. Note that case #0, the
10541054 assert(idx < getNumSuccessors() && "Successor # out of range!");
10551055 return cast(Operands[idx*2].get());
10561056 }
1057 virtual unsigned getNumSuccessors() const { return Operands.size()/2; }
1057 virtual unsigned getNumSuccessors() const { return (unsigned)Operands.size()/2; }
10581058
10591059 // Methods for support type inquiry through isa, cast, and dyn_cast:
10601060 static inline bool classof(const SwitchInst *) { return true; }
200200 inline reverse_giterator grend () { return GlobalList.rend(); }
201201 inline const_reverse_giterator grend () const { return GlobalList.rend(); }
202202
203 inline unsigned gsize() const { return GlobalList.size(); }
203 inline size_t gsize() const { return GlobalList.size(); }
204204 inline bool gempty() const { return GlobalList.empty(); }
205205 inline const GlobalVariable &gfront() const { return GlobalList.front(); }
206206 inline GlobalVariable &gfront() { return GlobalList.front(); }
218218 inline reverse_iterator rend () { return FunctionList.rend(); }
219219 inline const_reverse_iterator rend () const { return FunctionList.rend(); }
220220
221 inline unsigned size() const { return FunctionList.size(); }
221 inline size_t size() const { return FunctionList.size(); }
222222 inline bool empty() const { return FunctionList.empty(); }
223223 inline const Function &front() const { return FunctionList.front(); }
224224 inline Function &front() { return FunctionList.front(); }
235235 inline lib_iterator lib_end() const { return LibraryList.end(); }
236236
237237 /// @brief Returns the number of items in the list of libraries.
238 inline unsigned lib_size() const { return LibraryList.size(); }
238 inline size_t lib_size() const { return LibraryList.size(); }
239239
240240 /// @brief Add a library to the list of dependent libraries
241241 inline void addLibrary(const std::string& Lib){ LibraryList.insert(Lib); }
118118 unsigned type_size(const Type *TypeID) const;
119119
120120 /// @brief The number of name/type pairs is returned.
121 inline unsigned num_types() const { return tmap.size(); }
121 inline unsigned num_types() const { return (unsigned)tmap.size(); }
122122
123123 /// Finds the value \p val in the symbol table and returns its
124124 /// name. Only the type plane associated with the type of \p val
4343 assert(i < Operands.size() && "setOperand() out of range!");
4444 Operands[i] = Val;
4545 }
46 inline unsigned getNumOperands() const { return Operands.size(); }
46 inline unsigned getNumOperands() const { return (unsigned)Operands.size(); }
4747
4848 // ---------------------------------------------------------------------------
4949 // Operand Iterator interface...