Fix VS warnings


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19383 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Transforms/TransformInternals.cpp b/lib/Transforms/TransformInternals.cpp
index 3f7d8db..7aca672 100644
--- a/lib/Transforms/TransformInternals.cpp
+++ b/lib/Transforms/TransformInternals.cpp
@@ -73,7 +73,7 @@
            "Offset not in composite!");
 
     NextType = ATy->getElementType();
-    unsigned ChildSize = TD.getTypeSize(NextType);
+    unsigned ChildSize = (unsigned)TD.getTypeSize(NextType);
     if (ConstantSInt::isValueValidForType(Type::IntTy, Offset/ChildSize))
       Indices.push_back(ConstantSInt::get(Type::IntTy, Offset/ChildSize));
     else
@@ -84,10 +84,10 @@
     return Ty;    // Return the leaf type
   }
 
-  unsigned SubOffs = Offset - ThisOffset;
+  unsigned SubOffs = unsigned(Offset - ThisOffset);
   const Type *LeafTy = getStructOffsetType(NextType, SubOffs,
                                            Indices, TD, StopEarly);
-  Offset = ThisOffset + SubOffs;
+  Offset = unsigned(ThisOffset + SubOffs);
   return LeafTy;
 }