Silence VC++ warnings.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19506 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/DataStructure/Local.cpp b/lib/Analysis/DataStructure/Local.cpp
index 1b30d1e..8d1391f 100644
--- a/lib/Analysis/DataStructure/Local.cpp
+++ b/lib/Analysis/DataStructure/Local.cpp
@@ -382,8 +382,9 @@
   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 @@
     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)) {