[llvm] r207337 - [LCG] Add some pedantry to the use of ptrdiff_t to appease build bots.

Chandler Carruth chandlerc at gmail.com
Sat Apr 26 15:59:29 PDT 2014


Author: chandlerc
Date: Sat Apr 26 17:59:28 2014
New Revision: 207337

URL: http://llvm.org/viewvc/llvm-project?rev=207337&view=rev
Log:
[LCG] Add some pedantry to the use of ptrdiff_t to appease build bots.

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

Modified: llvm/trunk/include/llvm/ADT/iterator.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/iterator.h?rev=207337&r1=207336&r2=207337&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/iterator.h (original)
+++ llvm/trunk/include/llvm/ADT/iterator.h Sat Apr 26 17:59:28 2014
@@ -11,6 +11,7 @@
 #define LLVM_ADT_ITERATOR_H
 
 #include <iterator>
+#include <cstddef>
 
 namespace llvm {
 
@@ -32,7 +33,7 @@ namespace llvm {
 /// terms of addition of one. These aren't equivalent for all iterator
 /// categories, and respecting that adds a lot of complexity for little gain.
 template <typename DerivedT, typename IteratorCategoryT, typename T,
-          typename DifferenceTypeT = ptrdiff_t, typename PointerT = T *,
+          typename DifferenceTypeT = std::ptrdiff_t, typename PointerT = T *,
           typename ReferenceT = T &>
 struct iterator_facade_base
     : std::iterator<IteratorCategoryT, T, DifferenceTypeT, PointerT,





More information about the llvm-commits mailing list