Fixing -Wtype-limits warnings with the asserts (the expression would always evaluate to true). Also fixing a -Wcast-qual warning, where the cast expression isn't required.

llvm-svn: 221888
diff --git a/llvm/lib/Support/StreamingMemoryObject.cpp b/llvm/lib/Support/StreamingMemoryObject.cpp
index f0eb831..68beeef 100644
--- a/llvm/lib/Support/StreamingMemoryObject.cpp
+++ b/llvm/lib/Support/StreamingMemoryObject.cpp
@@ -59,9 +59,9 @@
   if (End > BufferSize)
     End = BufferSize;
 
+  assert(static_cast<int64_t>(End - Address) >= 0);
   Size = End - Address;
-  assert(Size >= 0);
-  memcpy(Buf, (uint8_t *)(Address + FirstChar), Size);
+  memcpy(Buf, Address + FirstChar, Size);
   return Size;
 }
 
@@ -96,8 +96,8 @@
   uint64_t End = Address + Size;
   if (End > BytesRead)
     End = BytesRead;
+  assert(static_cast<int64_t>(End - Address) >= 0);
   Size = End - Address;
-  assert(Size >= 0);
   memcpy(Buf, &Bytes[Address + BytesSkipped], Size);
   return Size;
 }