Added ImmutableMap constructor that accepts a const TreeTy*.
[oota-llvm.git] / include / llvm / ADT / STLExtras.h
index 9a17e6cce903580eb368320fd82e8ce79004d099..5c5e4aa9444f0a7edf4a30064116ad06c70c41db 100644 (file)
@@ -2,8 +2,8 @@
 //
 //                     The LLVM Compiler Infrastructure
 //
-// This file was developed by the LLVM research group and is distributed under
-// the University of Illinois Open Source License. See LICENSE.TXT for details.
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
 //
@@ -20,7 +20,7 @@
 #include <functional>
 #include <utility> // for std::pair
 #include <cstring> // for std::size_t
-#include "llvm/ADT/iterator"
+#include "llvm/ADT/iterator.h"
 
 namespace llvm {
 
@@ -137,8 +137,7 @@ inline ItTy next(ItTy it, Dist n)
 template <typename ItTy>
 inline ItTy next(ItTy it)
 {
-  std::advance(it, 1);
-  return it;
+  return ++it;
 }
 
 template <typename ItTy, typename Dist>
@@ -151,8 +150,7 @@ inline ItTy prior(ItTy it, Dist n)
 template <typename ItTy>
 inline ItTy prior(ItTy it)
 {
-  std::advance(it, -1);
-  return it;
+  return --it;
 }
 
 //===----------------------------------------------------------------------===//