diff options
author | Chris Lattner <sabre@nondot.org> | 2005-01-12 04:51:37 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-01-12 04:51:37 +0000 |
commit | 507bdf9488e6be6fac3a7122a603cd3b989ba2b0 (patch) | |
tree | f6cf35502caaf14e9cb780b319d7e80c02b08122 /lib/Analysis/DataStructure/Local.cpp | |
parent | bf7c1521f59a68481a311fb3fc2a506a087aeed9 (diff) |
Silence VC++ warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19506 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DataStructure/Local.cpp')
-rw-r--r-- | lib/Analysis/DataStructure/Local.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Analysis/DataStructure/Local.cpp b/lib/Analysis/DataStructure/Local.cpp index 1b30d1e9d3..8d1391f582 100644 --- a/lib/Analysis/DataStructure/Local.cpp +++ b/lib/Analysis/DataStructure/Local.cpp @@ -382,8 +382,9 @@ void GraphBuilder::visitGetElementPtrInst(User &GEP) { for (gep_type_iterator I = gep_type_begin(GEP), E = gep_type_end(GEP); I != E; ++I) if (const StructType *STy = dyn_cast<StructType>(*I)) { - unsigned FieldNo = cast<ConstantUInt>(I.getOperand())->getValue(); - Offset += TD.getStructLayout(STy)->MemberOffsets[FieldNo]; + unsigned FieldNo = + (unsigned)cast<ConstantUInt>(I.getOperand())->getValue(); + Offset += (unsigned)TD.getStructLayout(STy)->MemberOffsets[FieldNo]; } else if (const PointerType *PTy = dyn_cast<PointerType>(*I)) { if (!isa<Constant>(I.getOperand()) || !cast<Constant>(I.getOperand())->isNullValue()) @@ -1030,7 +1031,7 @@ void GraphBuilder::MergeConstantInitIntoNode(DSNodeHandle &NH, Constant *C) { const StructLayout *SL = TD.getStructLayout(CS->getType()); for (unsigned i = 0, e = CS->getNumOperands(); i != e; ++i) { DSNode *NHN = NH.getNode(); - DSNodeHandle NewNH(NHN, NH.getOffset()+SL->MemberOffsets[i]); + DSNodeHandle NewNH(NHN, NH.getOffset()+(unsigned)SL->MemberOffsets[i]); MergeConstantInitIntoNode(NewNH, cast<Constant>(CS->getOperand(i))); } } else if (isa<ConstantAggregateZero>(C) || isa<UndefValue>(C)) { |