Silence VS warnings.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19390 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/ExecutionEngine/JIT/JIT.cpp b/lib/ExecutionEngine/JIT/JIT.cpp
index 2bab9e7..1d781d6 100644
--- a/lib/ExecutionEngine/JIT/JIT.cpp
+++ b/lib/ExecutionEngine/JIT/JIT.cpp
@@ -284,7 +284,8 @@
     // If the global hasn't been emitted to memory yet, allocate space.  We will
     // actually initialize the global after current function has finished
     // compilation.
-    Ptr =new char[getTargetData().getTypeSize(GV->getType()->getElementType())];
+    uint64_t S = getTargetData().getTypeSize(GV->getType()->getElementType());
+    Ptr = new char[(size_t)S];
     PendingGlobals.push_back(GV);
   }
   addGlobalMapping(GV, Ptr);
diff --git a/lib/ExecutionEngine/JIT/JITEmitter.cpp b/lib/ExecutionEngine/JIT/JITEmitter.cpp
index 6603433..bd00c96 100644
--- a/lib/ExecutionEngine/JIT/JITEmitter.cpp
+++ b/lib/ExecutionEngine/JIT/JITEmitter.cpp
@@ -360,7 +360,7 @@
   unsigned TotalSize = 0;
   for (unsigned i = 0, e = Constants.size(); i != e; ++i) {
     const Type *Ty = Constants[i]->getType();
-    unsigned Size      = TheJIT->getTargetData().getTypeSize(Ty);
+    unsigned Size      = (unsigned)TheJIT->getTargetData().getTypeSize(Ty);
     unsigned Alignment = TheJIT->getTargetData().getTypeAlignment(Ty);
     // Make sure to take into account the alignment requirements of the type.
     TotalSize = (TotalSize + Alignment-1) & ~(Alignment-1);