diff options
Diffstat (limited to 'include/llvm/ADT')
-rw-r--r-- | include/llvm/ADT/BitSetVector.h | 3 | ||||
-rw-r--r-- | include/llvm/ADT/DepthFirstIterator.h | 3 | ||||
-rw-r--r-- | include/llvm/ADT/EquivalenceClasses.h | 4 | ||||
-rw-r--r-- | include/llvm/ADT/GraphTraits.h | 4 | ||||
-rw-r--r-- | include/llvm/ADT/PostOrderIterator.h | 4 | ||||
-rw-r--r-- | include/llvm/ADT/SCCIterator.h | 4 | ||||
-rw-r--r-- | include/llvm/ADT/STLExtras.h | 4 | ||||
-rw-r--r-- | include/llvm/ADT/SetOperations.h | 4 | ||||
-rw-r--r-- | include/llvm/ADT/Statistic.h | 4 | ||||
-rw-r--r-- | include/llvm/ADT/StringExtras.h | 4 | ||||
-rw-r--r-- | include/llvm/ADT/Tree.h | 3 | ||||
-rw-r--r-- | include/llvm/ADT/VectorExtras.h | 4 | ||||
-rw-r--r-- | include/llvm/ADT/ilist | 6 |
13 files changed, 50 insertions, 1 deletions
diff --git a/include/llvm/ADT/BitSetVector.h b/include/llvm/ADT/BitSetVector.h index 08bafa1..72f55b3 100644 --- a/include/llvm/ADT/BitSetVector.h +++ b/include/llvm/ADT/BitSetVector.h @@ -30,6 +30,8 @@ #include <functional> #include <iostream> +namespace llvm { + class BitSetVector { enum { BITSET_WORDSIZE = sizeof(long)*8 }; @@ -266,4 +268,5 @@ inline bool Disjoint(const BitSetVector& set1, return true; } +} // End llvm namespace #endif diff --git a/include/llvm/ADT/DepthFirstIterator.h b/include/llvm/ADT/DepthFirstIterator.h index bb7673c..c465f4e 100644 --- a/include/llvm/ADT/DepthFirstIterator.h +++ b/include/llvm/ADT/DepthFirstIterator.h @@ -38,6 +38,8 @@ #include <vector> #include <set> +namespace llvm { + // df_iterator_storage - A private class which is used to figure out where to // store the visited set. template<class SetType, bool External> // Non-external set @@ -223,5 +225,6 @@ idf_ext_iterator<T, SetTy> idf_ext_end(T G, SetTy &S) { return idf_ext_iterator<T, SetTy>::end(G, S); } +} // End llvm namespace #endif diff --git a/include/llvm/ADT/EquivalenceClasses.h b/include/llvm/ADT/EquivalenceClasses.h index 01e8c5e..46e626b 100644 --- a/include/llvm/ADT/EquivalenceClasses.h +++ b/include/llvm/ADT/EquivalenceClasses.h @@ -20,6 +20,8 @@ #include <map> #include <vector> +namespace llvm { + template <class ElemTy> class EquivalenceClasses { // Maps each element to the element that is the leader of its @@ -89,4 +91,6 @@ public: } }; +} // End llvm namespace + #endif diff --git a/include/llvm/ADT/GraphTraits.h b/include/llvm/ADT/GraphTraits.h index 305f71e..4ff7417 100644 --- a/include/llvm/ADT/GraphTraits.h +++ b/include/llvm/ADT/GraphTraits.h @@ -18,6 +18,8 @@ #ifndef SUPPORT_GRAPHTRAITS_H #define SUPPORT_GRAPHTRAITS_H +namespace llvm { + // GraphTraits - This class should be specialized by different graph types... // which is why the default version is empty. // @@ -76,4 +78,6 @@ struct Inverse { inline Inverse(GraphType &G) : Graph(G) {} }; +} // End llvm namespace + #endif diff --git a/include/llvm/ADT/PostOrderIterator.h b/include/llvm/ADT/PostOrderIterator.h index 9309554..d66c4b8 100644 --- a/include/llvm/ADT/PostOrderIterator.h +++ b/include/llvm/ADT/PostOrderIterator.h @@ -21,6 +21,8 @@ #include <stack> #include <set> +namespace llvm { + template<class GraphT, class GT = GraphTraits<GraphT> > class po_iterator : public forward_iterator<typename GT::NodeType, ptrdiff_t> { typedef forward_iterator<typename GT::NodeType, ptrdiff_t> super; @@ -149,4 +151,6 @@ public: inline rpo_iterator end() { return Blocks.rend(); } }; +} // End llvm namespace + #endif diff --git a/include/llvm/ADT/SCCIterator.h b/include/llvm/ADT/SCCIterator.h index cf137cd..f21c7d1 100644 --- a/include/llvm/ADT/SCCIterator.h +++ b/include/llvm/ADT/SCCIterator.h @@ -26,6 +26,8 @@ #include <vector> #include <map> +namespace llvm { + //===----------------------------------------------------------------------===// /// /// scc_iterator - Enumerate the SCCs of a directed graph, in @@ -197,4 +199,6 @@ scc_iterator<T> scc_end(T G) { return scc_iterator<T>::end(G); } +} // End llvm namespace + #endif diff --git a/include/llvm/ADT/STLExtras.h b/include/llvm/ADT/STLExtras.h index 28c46e3..06a1573 100644 --- a/include/llvm/ADT/STLExtras.h +++ b/include/llvm/ADT/STLExtras.h @@ -21,6 +21,8 @@ #include "Support/iterator" #include "boost/type_traits/transform_traits.hpp" +namespace llvm { + //===----------------------------------------------------------------------===// // Extra additions to <functional> //===----------------------------------------------------------------------===// @@ -278,4 +280,6 @@ inline tier<T1, T2> tie(T1& f, T2& s) { return tier<T1, T2>(f, s); } +} // End llvm namespace + #endif diff --git a/include/llvm/ADT/SetOperations.h b/include/llvm/ADT/SetOperations.h index dc6e0d6..bb1e68e 100644 --- a/include/llvm/ADT/SetOperations.h +++ b/include/llvm/ADT/SetOperations.h @@ -15,6 +15,8 @@ #ifndef SUPPORT_SETOPERATIONS_H #define SUPPORT_SETOPERATIONS_H +namespace llvm { + // set_union(A, B) - Compute A := A u B, return whether A changed. // template <class S1Ty, class S2Ty> @@ -64,4 +66,6 @@ void set_subtract(S1Ty &S1, const S2Ty &S2) { S1.erase(*SI); } +} // End llvm namespace + #endif diff --git a/include/llvm/ADT/Statistic.h b/include/llvm/ADT/Statistic.h index d69809f..4e592d5 100644 --- a/include/llvm/ADT/Statistic.h +++ b/include/llvm/ADT/Statistic.h @@ -26,6 +26,8 @@ #include <iosfwd> +namespace llvm { + // StatisticBase - Nontemplated base class for Statistic<> class... class StatisticBase { const char *Name; @@ -78,4 +80,6 @@ public: const Statistic &operator-=(const DataType &V) { Value -= V; return *this; } }; +} // End llvm namespace + #endif diff --git a/include/llvm/ADT/StringExtras.h b/include/llvm/ADT/StringExtras.h index 2c50c1c..2ebac81 100644 --- a/include/llvm/ADT/StringExtras.h +++ b/include/llvm/ADT/StringExtras.h @@ -18,6 +18,8 @@ #include <string> #include <stdio.h> +namespace llvm { + static inline std::string utohexstr(uint64_t X) { char Buffer[40]; char *BufPtr = Buffer+39; @@ -95,4 +97,6 @@ static inline std::string ftostr(double V) { return Buffer; } +} // End llvm namespace + #endif diff --git a/include/llvm/ADT/Tree.h b/include/llvm/ADT/Tree.h index e645431..bc5495f 100644 --- a/include/llvm/ADT/Tree.h +++ b/include/llvm/ADT/Tree.h @@ -17,6 +17,8 @@ #include <vector> +namespace llvm { + template<class ConcreteTreeNode, class Payload> class Tree { std::vector<ConcreteTreeNode*> Children; // This nodes children, if any @@ -55,5 +57,6 @@ public: inline const Payload &getTreeData() const { return Data; } }; +} // End llvm namespace #endif diff --git a/include/llvm/ADT/VectorExtras.h b/include/llvm/ADT/VectorExtras.h index 3277830..cf7cf5d 100644 --- a/include/llvm/ADT/VectorExtras.h +++ b/include/llvm/ADT/VectorExtras.h @@ -17,6 +17,8 @@ #include <cstdarg> +namespace llvm { + /// make_vector - Helper function which is useful for building temporary vectors /// to pass into type construction of CallInst ctors. This turns a null /// terminated list of pointers (or other value types) into a real live vector. @@ -33,4 +35,6 @@ inline std::vector<T> make_vector(T A, ...) { return Result; } +} // End llvm namespace + #endif diff --git a/include/llvm/ADT/ilist b/include/llvm/ADT/ilist index 488a90f..7f4d265 100644 --- a/include/llvm/ADT/ilist +++ b/include/llvm/ADT/ilist @@ -41,6 +41,8 @@ #include <Support/iterator> #include <cassert> +namespace llvm { + template<typename NodeTy, typename Traits> class iplist; template<typename NodeTy> class ilist_iterator; @@ -522,10 +524,12 @@ struct ilist : public iplist<NodeTy> { void resize(size_type newsize) { resize(newsize, NodeTy()); } }; +} // End llvm namespace + namespace std { // Ensure that swap uses the fast list swap... template<class Ty> - void swap(iplist<Ty> &Left, iplist<Ty> &Right) { + void swap(llvm::iplist<Ty> &Left, llvm::iplist<Ty> &Right) { Left.swap(Right); } } // End 'std' extensions... |