[PATCH] D35042: [llvm] Separate out reverse iteration flag into its own header
Mandeep Singh Grang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 6 11:52:49 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL307297: [llvm] Separate out reverse iteration flag into its own header (authored by mgrang).
Changed prior to commit:
https://reviews.llvm.org/D35042?vs=105372&id=105500#toc
Repository:
rL LLVM
https://reviews.llvm.org/D35042
Files:
llvm/trunk/include/llvm/ADT/SmallPtrSet.h
llvm/trunk/include/llvm/Support/ReverseIteration.h
Index: llvm/trunk/include/llvm/Support/ReverseIteration.h
===================================================================
--- llvm/trunk/include/llvm/Support/ReverseIteration.h
+++ llvm/trunk/include/llvm/Support/ReverseIteration.h
@@ -0,0 +1,17 @@
+#ifndef LLVM_SUPPORT_REVERSEITERATION_H
+#define LLVM_SUPPORT_REVERSEITERATION_H
+
+#include "llvm/Config/abi-breaking.h"
+
+namespace llvm {
+#if LLVM_ENABLE_ABI_BREAKING_CHECKS
+template <class T = void> struct ReverseIterate { static bool value; };
+#if LLVM_ENABLE_REVERSE_ITERATION
+template <class T> bool ReverseIterate<T>::value = true;
+#else
+template <class T> bool ReverseIterate<T>::value = false;
+#endif
+#endif
+}
+
+#endif
Index: llvm/trunk/include/llvm/ADT/SmallPtrSet.h
===================================================================
--- llvm/trunk/include/llvm/ADT/SmallPtrSet.h
+++ llvm/trunk/include/llvm/ADT/SmallPtrSet.h
@@ -15,9 +15,9 @@
#ifndef LLVM_ADT_SMALLPTRSET_H
#define LLVM_ADT_SMALLPTRSET_H
-#include "llvm/Config/abi-breaking.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/PointerLikeTypeTraits.h"
+#include "llvm/Support/ReverseIteration.h"
#include "llvm/Support/type_traits.h"
#include <cassert>
#include <cstddef>
@@ -29,15 +29,6 @@
namespace llvm {
-#if LLVM_ENABLE_ABI_BREAKING_CHECKS
-template <class T = void> struct ReverseIterate { static bool value; };
-#if LLVM_ENABLE_REVERSE_ITERATION
-template <class T> bool ReverseIterate<T>::value = true;
-#else
-template <class T> bool ReverseIterate<T>::value = false;
-#endif
-#endif
-
/// SmallPtrSetImplBase - This is the common code shared among all the
/// SmallPtrSet<>'s, which is almost everything. SmallPtrSet has two modes, one
/// for small and one for large sets.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35042.105500.patch
Type: text/x-patch
Size: 1755 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170706/a6fa4d1f/attachment.bin>
More information about the llvm-commits
mailing list