diff options
author | Chris Lattner <sabre@nondot.org> | 2004-11-15 19:02:35 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-11-15 19:02:35 +0000 |
commit | c063502e326fe0206942192773b263a3d88d93f5 (patch) | |
tree | b7ed7ed11dc2f82783b082a39bbbc7a0c5863a0c /include/llvm/Instructions.h | |
parent | 96326f9d312585532c95dcc31626f45f16cd5dd8 (diff) | |
download | external_llvm-c063502e326fe0206942192773b263a3d88d93f5.zip external_llvm-c063502e326fe0206942192773b263a3d88d93f5.tar.gz external_llvm-c063502e326fe0206942192773b263a3d88d93f5.tar.bz2 |
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
Diffstat (limited to 'include/llvm/Instructions.h')
-rw-r--r-- | include/llvm/Instructions.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h index 5ba361b..714f7d7 100644 --- a/include/llvm/Instructions.h +++ b/include/llvm/Instructions.h @@ -275,7 +275,7 @@ class GetElementPtrInst : public Instruction { : Instruction((static_cast<const Instruction*>(&EPI)->getType()), GetElementPtr) { Operands.reserve(EPI.Operands.size()); - for (unsigned i = 0, E = EPI.Operands.size(); i != E; ++i) + for (unsigned i = 0, E = (unsigned)EPI.Operands.size(); i != E; ++i) Operands.push_back(Use(EPI.Operands[i], this)); } void init(Value *Ptr, const std::vector<Value*> &Idx); @@ -712,7 +712,7 @@ public: /// getNumIncomingValues - Return the number of incoming edges /// - unsigned getNumIncomingValues() const { return Operands.size()/2; } + unsigned getNumIncomingValues() const { return (unsigned)Operands.size()/2; } /// getIncomingValue - Return incoming value #x /// @@ -994,7 +994,7 @@ public: /// getNumCases - return the number of 'cases' in this switch instruction. /// Note that case #0 is always the default case. unsigned getNumCases() const { - return Operands.size()/2; + return (unsigned)Operands.size()/2; } /// getCaseValue - Return the specified case value. Note that case #0, the @@ -1055,7 +1055,7 @@ public: assert(idx < getNumSuccessors() && "Successor # out of range!"); return cast<Constant>(Operands[idx*2].get()); } - virtual unsigned getNumSuccessors() const { return Operands.size()/2; } + virtual unsigned getNumSuccessors() const { return (unsigned)Operands.size()/2; } // Methods for support type inquiry through isa, cast, and dyn_cast: static inline bool classof(const SwitchInst *) { return true; } |