Fold the useful features of alist and alist_node into ilist, and
[oota-llvm.git] / include / llvm / Support / OutputBuffer.h
index d16adbd93f39008788ba5508bb1a6c2ce8bb75ca..0fedb15e40507a64faf9edef7d9fbc2f832488bf 100644 (file)
@@ -107,8 +107,10 @@ namespace llvm {
         outxword(X);
     }
     void outstring(const std::string &S, unsigned Length) {
-      unsigned len_to_copy = S.length() < Length ? S.length() : Length;
-      unsigned len_to_fill = S.length() < Length ? Length - S.length() : 0;
+      unsigned len_to_copy = static_cast<unsigned>(S.length()) < Length
+        ? static_cast<unsigned>(S.length()) : Length;
+      unsigned len_to_fill = static_cast<unsigned>(S.length()) < Length
+        ? Length - static_cast<unsigned>(S.length()) : 0;
       
       for (unsigned i = 0; i < len_to_copy; ++i)
         outbyte(S[i]);