Fix a compiler warning about comparing signed with unsigned.
authorDan Gohman <gohman@apple.com>
Thu, 13 Aug 2009 20:32:03 +0000 (20:32 +0000)
committerDan Gohman <gohman@apple.com>
Thu, 13 Aug 2009 20:32:03 +0000 (20:32 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78933 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/raw_ostream.cpp

index 3ea5c9af8358cd15cdc6d3fffb9060a7f116983b..f0090d8d93f932bb2e84885980ff87da924ff6f6 100644 (file)
@@ -222,7 +222,7 @@ raw_ostream &raw_ostream::write(const char *Ptr, size_t Size) {
 }
 
 void raw_ostream::copy_to_buffer(const char *Ptr, size_t Size) {
-  assert(Size <= OutBufEnd - OutBufCur && "Buffer overrun!");
+  assert(Size <= size_t(OutBufEnd - OutBufCur) && "Buffer overrun!");
 
   // Handle short strings specially, memcpy isn't very good at very short
   // strings.