[llvm] r180847 - fix windows warning.

Peng Cheng gm4cheng at gmail.com
Wed May 1 07:18:06 PDT 2013


Author: chp
Date: Wed May  1 09:18:06 2013
New Revision: 180847

URL: http://llvm.org/viewvc/llvm-project?rev=180847&view=rev
Log:
fix windows warning. 

warning C4244: 'argument' : conversion from 'uint64_t' to 'const unsigned int', possible loss of data

Modified:
    llvm/trunk/include/llvm/ADT/StringRef.h

Modified: llvm/trunk/include/llvm/ADT/StringRef.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/StringRef.h?rev=180847&r1=180846&r2=180847&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/StringRef.h (original)
+++ llvm/trunk/include/llvm/ADT/StringRef.h Wed May  1 09:18:06 2013
@@ -390,14 +390,14 @@ namespace llvm {
 
     /// Return a StringRef equal to 'this' but with the first \p N elements
     /// dropped.
-    StringRef drop_front(unsigned N = 1) const {
+    StringRef drop_front(size_t N = 1) const {
       assert(size() >= N && "Dropping more elements than exist");
       return substr(N);
     }
 
     /// Return a StringRef equal to 'this' but with the last \p N elements
     /// dropped.
-    StringRef drop_back(unsigned N = 1) const {
+    StringRef drop_back(size_t N = 1) const {
       assert(size() >= N && "Dropping more elements than exist");
       return substr(0, size()-N);
     }





More information about the llvm-commits mailing list