[llvm-commits] CVS: llvm/include/Support/Annotation.h BitSetVector.h Casting.h CommandLine.h DOTGraphTraits.h Debug.h DepthFirstIterator.h DynamicLinker.h EquivalenceClasses.h FileUtilities.h GraphTraits.h GraphWriter.h LeakDetector.h MallocAllocator.h MathExtras.h PostOrderIterator.h SCCIterator.h STLExtras.h SetOperations.h Signals.h Statistic.h StringExtras.h SystemUtils.h Timer.h Tree.h TypeInfo.h VectorExtras.h ilist

Brian Gaeke gaeke at cs.uiuc.edu
Tue Nov 11 16:46:31 PST 2003


Changes in directory llvm/include/Support:

Annotation.h updated: 1.12 -> 1.13
BitSetVector.h updated: 1.10 -> 1.11
Casting.h updated: 1.10 -> 1.11
CommandLine.h updated: 1.27 -> 1.28
DOTGraphTraits.h updated: 1.7 -> 1.8
Debug.h updated: 1.2 -> 1.3
DepthFirstIterator.h updated: 1.11 -> 1.12
DynamicLinker.h updated: 1.2 -> 1.3
EquivalenceClasses.h updated: 1.5 -> 1.6
FileUtilities.h updated: 1.7 -> 1.8
GraphTraits.h updated: 1.5 -> 1.6
GraphWriter.h updated: 1.16 -> 1.17
LeakDetector.h updated: 1.3 -> 1.4
MallocAllocator.h updated: 1.3 -> 1.4
MathExtras.h updated: 1.8 -> 1.9
PostOrderIterator.h updated: 1.13 -> 1.14
SCCIterator.h updated: 1.16 -> 1.17
STLExtras.h updated: 1.9 -> 1.10
SetOperations.h updated: 1.4 -> 1.5
Signals.h updated: 1.6 -> 1.7
Statistic.h updated: 1.7 -> 1.8
StringExtras.h updated: 1.9 -> 1.10
SystemUtils.h updated: 1.8 -> 1.9
Timer.h updated: 1.11 -> 1.12
Tree.h updated: 1.8 -> 1.9
TypeInfo.h updated: 1.4 -> 1.5
VectorExtras.h updated: 1.2 -> 1.3
ilist updated: 1.14 -> 1.15

---
Log message:

Put all LLVM code into the llvm namespace, as per bug 109.

---
Diffs of the changes:  (+110 -2)

Index: llvm/include/Support/Annotation.h
diff -u llvm/include/Support/Annotation.h:1.12 llvm/include/Support/Annotation.h:1.13
--- llvm/include/Support/Annotation.h:1.12	Mon Oct 20 14:46:57 2003
+++ llvm/include/Support/Annotation.h	Tue Nov 11 16:41:29 2003
@@ -25,6 +25,8 @@
 #include <string>
 #include <cassert>
 
+namespace llvm {
+
 class AnnotationID;
 class Annotation;
 class Annotable;
@@ -216,5 +218,7 @@
   addAnnotation(A);
   return A;
 }
+
+} // End namespace llvm
 
 #endif


Index: llvm/include/Support/BitSetVector.h
diff -u llvm/include/Support/BitSetVector.h:1.10 llvm/include/Support/BitSetVector.h:1.11
--- llvm/include/Support/BitSetVector.h:1.10	Mon Oct 20 14:46:57 2003
+++ llvm/include/Support/BitSetVector.h	Tue Nov 11 16:41:29 2003
@@ -30,6 +30,8 @@
 #include <functional>
 #include <iostream>
 
+namespace llvm {
+
 class BitSetVector {
   enum { BITSET_WORDSIZE = sizeof(long)*8 };
 
@@ -266,4 +268,5 @@
   return true;
 }
 
+} // End llvm namespace
 #endif


Index: llvm/include/Support/Casting.h
diff -u llvm/include/Support/Casting.h:1.10 llvm/include/Support/Casting.h:1.11
--- llvm/include/Support/Casting.h:1.10	Mon Oct 20 14:46:57 2003
+++ llvm/include/Support/Casting.h	Tue Nov 11 16:41:29 2003
@@ -15,6 +15,8 @@
 #ifndef SUPPORT_CASTING_H
 #define SUPPORT_CASTING_H
 
+namespace llvm {
+
 //===----------------------------------------------------------------------===//
 //                          isa<x> Support Templates
 //===----------------------------------------------------------------------===//
@@ -292,5 +294,7 @@
 }
 
 #endif
+
+} // End llvm namespace
 
 #endif


Index: llvm/include/Support/CommandLine.h
diff -u llvm/include/Support/CommandLine.h:1.27 llvm/include/Support/CommandLine.h:1.28
--- llvm/include/Support/CommandLine.h:1.27	Mon Oct 20 14:46:57 2003
+++ llvm/include/Support/CommandLine.h	Tue Nov 11 16:41:29 2003
@@ -27,6 +27,7 @@
 #include <cassert>
 #include "boost/type_traits/object_traits.hpp"
 
+namespace llvm {
 /// cl Namespace - This namespace contains all of the command line option
 /// processing machinery.  It is intentionally a short name to make qualified
 /// usage concise.
@@ -1021,5 +1022,7 @@
 };
 
 } // End namespace cl
+
+} // End namespace llvm
 
 #endif


Index: llvm/include/Support/DOTGraphTraits.h
diff -u llvm/include/Support/DOTGraphTraits.h:1.7 llvm/include/Support/DOTGraphTraits.h:1.8
--- llvm/include/Support/DOTGraphTraits.h:1.7	Mon Oct 20 14:46:57 2003
+++ llvm/include/Support/DOTGraphTraits.h	Tue Nov 11 16:41:29 2003
@@ -19,6 +19,8 @@
 
 #include <string>
 
+namespace llvm {
+
 /// DefaultDOTGraphTraits - This class provides the default implementations of
 /// all of the DOTGraphTraits methods.  If a specialization does not need to
 /// override all methods here it should inherit so that it can get the default
@@ -95,5 +97,7 @@
 ///
 template <typename Ty>
 class DOTGraphTraits : public DefaultDOTGraphTraits {};
+
+} // End llvm namespace
 
 #endif


Index: llvm/include/Support/Debug.h
diff -u llvm/include/Support/Debug.h:1.2 llvm/include/Support/Debug.h:1.3
--- llvm/include/Support/Debug.h:1.2	Mon Oct 20 14:46:57 2003
+++ llvm/include/Support/Debug.h	Tue Nov 11 16:41:29 2003
@@ -26,6 +26,8 @@
 #ifndef SUPPORT_DEBUG_H
 #define SUPPORT_DEBUG_H
 
+namespace llvm {
+
 // DebugFlag - This boolean is set to true if the '-debug' command line option
 // is specified.  This should probably not be referenced directly, instead, use
 // the DEBUG macro below.
@@ -56,5 +58,7 @@
 #define DEBUG(X) \
   do { if (DebugFlag && isCurrentDebugType(DEBUG_TYPE)) { X; } } while (0)
 #endif
+
+} // End llvm namespace
 
 #endif


Index: llvm/include/Support/DepthFirstIterator.h
diff -u llvm/include/Support/DepthFirstIterator.h:1.11 llvm/include/Support/DepthFirstIterator.h:1.12
--- llvm/include/Support/DepthFirstIterator.h:1.11	Mon Oct 20 14:46:57 2003
+++ llvm/include/Support/DepthFirstIterator.h	Tue Nov 11 16:41:29 2003
@@ -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 @@
   return idf_ext_iterator<T, SetTy>::end(G, S);
 }
 
+} // End llvm namespace
 
 #endif


Index: llvm/include/Support/DynamicLinker.h
diff -u llvm/include/Support/DynamicLinker.h:1.2 llvm/include/Support/DynamicLinker.h:1.3
--- llvm/include/Support/DynamicLinker.h:1.2	Mon Oct 20 14:46:57 2003
+++ llvm/include/Support/DynamicLinker.h	Tue Nov 11 16:41:29 2003
@@ -18,6 +18,8 @@
 
 #include <string>
 
+namespace llvm {
+
 /// LinkDynamicObject - Load the named file as a dynamic library
 /// and link it with the currently running process. Returns false
 /// on success, true if there is an error (and sets ErrorMessage
@@ -32,5 +34,7 @@
 /// 
 void *GetAddressOfSymbol (const char *symbolName);
 void *GetAddressOfSymbol (const std::string &symbolName);
+
+} // End llvm namespace
 
 #endif // SUPPORT_DYNAMICLINKER_H


Index: llvm/include/Support/EquivalenceClasses.h
diff -u llvm/include/Support/EquivalenceClasses.h:1.5 llvm/include/Support/EquivalenceClasses.h:1.6
--- llvm/include/Support/EquivalenceClasses.h:1.5	Mon Oct 20 14:46:57 2003
+++ llvm/include/Support/EquivalenceClasses.h	Tue Nov 11 16:41:29 2003
@@ -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 
@@ -88,5 +90,7 @@
     return Elem2ECLeaderMap ;
   }
 };
+
+} // End llvm namespace
 
 #endif


Index: llvm/include/Support/FileUtilities.h
diff -u llvm/include/Support/FileUtilities.h:1.7 llvm/include/Support/FileUtilities.h:1.8
--- llvm/include/Support/FileUtilities.h:1.7	Tue Nov 11 15:53:29 2003
+++ llvm/include/Support/FileUtilities.h	Tue Nov 11 16:41:29 2003
@@ -17,6 +17,8 @@
 
 #include <string>
 
+namespace llvm {
+
 /// CheckMagic - Returns true IFF the file named FN begins with Magic. FN must
 /// name a readable file.
 ///
@@ -94,5 +96,7 @@
 ///	In case of failure, the file's access attributes are unspecified.
 ///
 bool MakeFileReadable (const std::string & Filename);
+
+} // End llvm namespace
 
 #endif


Index: llvm/include/Support/GraphTraits.h
diff -u llvm/include/Support/GraphTraits.h:1.5 llvm/include/Support/GraphTraits.h:1.6
--- llvm/include/Support/GraphTraits.h:1.5	Mon Oct 20 14:46:57 2003
+++ llvm/include/Support/GraphTraits.h	Tue Nov 11 16:41:29 2003
@@ -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.
 //
@@ -75,5 +77,7 @@
 
   inline Inverse(GraphType &G) : Graph(G) {}
 };
+
+} // End llvm namespace
 
 #endif


Index: llvm/include/Support/GraphWriter.h
diff -u llvm/include/Support/GraphWriter.h:1.16 llvm/include/Support/GraphWriter.h:1.17
--- llvm/include/Support/GraphWriter.h:1.16	Fri Oct 31 16:16:41 2003
+++ llvm/include/Support/GraphWriter.h	Tue Nov 11 16:41:29 2003
@@ -28,6 +28,8 @@
 #include <vector>
 #include <iostream>
 
+namespace llvm {
+
 namespace DOT {  // Private functions...
   inline std::string EscapeString(const std::string &Label) {
     std::string Str(Label);
@@ -205,5 +207,7 @@
   W.writeFooter();
   return O;
 }
+
+} // End llvm namespace
 
 #endif


Index: llvm/include/Support/LeakDetector.h
diff -u llvm/include/Support/LeakDetector.h:1.3 llvm/include/Support/LeakDetector.h:1.4
--- llvm/include/Support/LeakDetector.h:1.3	Mon Oct 20 14:46:57 2003
+++ llvm/include/Support/LeakDetector.h	Tue Nov 11 16:41:29 2003
@@ -23,6 +23,9 @@
 #define SUPPORT_LEAKDETECTOR_H
 
 #include <string>
+
+namespace llvm {
+
 class Value;
 
 struct LeakDetector {
@@ -82,5 +85,7 @@
   static void removeGarbageObjectImpl(void *Object);
   static void checkForGarbageImpl(const std::string &Message);
 };
+
+} // End llvm namespace
 
 #endif


Index: llvm/include/Support/MallocAllocator.h
diff -u llvm/include/Support/MallocAllocator.h:1.3 llvm/include/Support/MallocAllocator.h:1.4
--- llvm/include/Support/MallocAllocator.h:1.3	Fri Nov  7 17:20:56 2003
+++ llvm/include/Support/MallocAllocator.h	Tue Nov 11 16:41:29 2003
@@ -23,6 +23,8 @@
 #include <cstdlib>
 #include <memory>
 
+namespace llvm {
+
 template<typename T>
 struct MallocAllocator {
   typedef size_t size_type;
@@ -79,5 +81,6 @@
   };
 }
 
+} // End llvm namespace
 
 #endif


Index: llvm/include/Support/MathExtras.h
diff -u llvm/include/Support/MathExtras.h:1.8 llvm/include/Support/MathExtras.h:1.9
--- llvm/include/Support/MathExtras.h:1.8	Mon Oct 20 14:46:57 2003
+++ llvm/include/Support/MathExtras.h	Tue Nov 11 16:41:29 2003
@@ -16,6 +16,8 @@
 
 #include "Support/DataTypes.h"
 
+namespace llvm {
+
 inline unsigned log2(uint64_t C) {
   unsigned getPow;
   for (getPow = 0; C > 1; ++getPow)
@@ -32,5 +34,7 @@
 
   return false;
 }
+
+} // End llvm namespace
 
 #endif


Index: llvm/include/Support/PostOrderIterator.h
diff -u llvm/include/Support/PostOrderIterator.h:1.13 llvm/include/Support/PostOrderIterator.h:1.14
--- llvm/include/Support/PostOrderIterator.h:1.13	Mon Oct 20 14:46:57 2003
+++ llvm/include/Support/PostOrderIterator.h	Tue Nov 11 16:41:29 2003
@@ -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;
@@ -148,5 +150,7 @@
   inline rpo_iterator begin() { return Blocks.rbegin(); }
   inline rpo_iterator end()   { return Blocks.rend(); }
 };
+
+} // End llvm namespace
 
 #endif


Index: llvm/include/Support/SCCIterator.h
diff -u llvm/include/Support/SCCIterator.h:1.16 llvm/include/Support/SCCIterator.h:1.17
--- llvm/include/Support/SCCIterator.h:1.16	Mon Oct 20 14:46:57 2003
+++ llvm/include/Support/SCCIterator.h	Tue Nov 11 16:41:29 2003
@@ -26,6 +26,8 @@
 #include <vector>
 #include <map>
 
+namespace llvm {
+
 //===----------------------------------------------------------------------===//
 ///
 /// scc_iterator - Enumerate the SCCs of a directed graph, in
@@ -196,5 +198,7 @@
 scc_iterator<T> scc_end(T G) {
   return scc_iterator<T>::end(G);
 }
+
+} // End llvm namespace
 
 #endif


Index: llvm/include/Support/STLExtras.h
diff -u llvm/include/Support/STLExtras.h:1.9 llvm/include/Support/STLExtras.h:1.10
--- llvm/include/Support/STLExtras.h:1.9	Tue Nov  4 23:58:26 2003
+++ llvm/include/Support/STLExtras.h	Tue Nov 11 16:41:29 2003
@@ -21,6 +21,8 @@
 #include "Support/iterator"
 #include "boost/type_traits/transform_traits.hpp"
 
+namespace llvm {
+
 //===----------------------------------------------------------------------===//
 //     Extra additions to <functional>
 //===----------------------------------------------------------------------===//
@@ -277,5 +279,7 @@
 inline tier<T1, T2> tie(T1& f, T2& s) {
   return tier<T1, T2>(f, s);
 }
+
+} // End llvm namespace
 
 #endif


Index: llvm/include/Support/SetOperations.h
diff -u llvm/include/Support/SetOperations.h:1.4 llvm/include/Support/SetOperations.h:1.5
--- llvm/include/Support/SetOperations.h:1.4	Mon Oct 20 14:46:57 2003
+++ llvm/include/Support/SetOperations.h	Tue Nov 11 16:41:29 2003
@@ -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>
@@ -63,5 +65,7 @@
        SI != SE; ++SI)  
     S1.erase(*SI);
 }
+
+} // End llvm namespace
 
 #endif


Index: llvm/include/Support/Signals.h
diff -u llvm/include/Support/Signals.h:1.6 llvm/include/Support/Signals.h:1.7
--- llvm/include/Support/Signals.h:1.6	Mon Oct 20 14:46:57 2003
+++ llvm/include/Support/Signals.h	Tue Nov 11 16:41:29 2003
@@ -17,10 +17,13 @@
 
 #include <string>
 
+namespace llvm {
+
 // RemoveFileOnSignal - This function registers signal handlers to ensure that
 // if a signal gets delivered that the named file is removed.
 //
 void RemoveFileOnSignal(const std::string &Filename);
 
-#endif
+} // End llvm namespace
 
+#endif


Index: llvm/include/Support/Statistic.h
diff -u llvm/include/Support/Statistic.h:1.7 llvm/include/Support/Statistic.h:1.8
--- llvm/include/Support/Statistic.h:1.7	Mon Oct 20 14:46:57 2003
+++ llvm/include/Support/Statistic.h	Tue Nov 11 16:41:29 2003
@@ -26,6 +26,8 @@
 
 #include <iosfwd>
 
+namespace llvm {
+
 // StatisticBase - Nontemplated base class for Statistic<> class...
 class StatisticBase {
   const char *Name;
@@ -77,5 +79,7 @@
   const Statistic &operator+=(const DataType &V) { Value += V; return *this; }
   const Statistic &operator-=(const DataType &V) { Value -= V; return *this; }
 };
+
+} // End llvm namespace
 
 #endif


Index: llvm/include/Support/StringExtras.h
diff -u llvm/include/Support/StringExtras.h:1.9 llvm/include/Support/StringExtras.h:1.10
--- llvm/include/Support/StringExtras.h:1.9	Thu Oct 30 09:03:49 2003
+++ llvm/include/Support/StringExtras.h	Tue Nov 11 16:41:29 2003
@@ -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;
@@ -94,5 +96,7 @@
   snprintf(Buffer, 200, "%20.6e", V);
   return Buffer;
 }
+
+} // End llvm namespace
 
 #endif


Index: llvm/include/Support/SystemUtils.h
diff -u llvm/include/Support/SystemUtils.h:1.8 llvm/include/Support/SystemUtils.h:1.9
--- llvm/include/Support/SystemUtils.h:1.8	Mon Oct 20 14:46:57 2003
+++ llvm/include/Support/SystemUtils.h	Tue Nov 11 16:41:29 2003
@@ -17,6 +17,8 @@
 
 #include <string>
 
+namespace llvm {
+
 /// isExecutableFile - This function returns true if the filename specified
 /// exists and is executable.
 ///
@@ -45,4 +47,7 @@
 /// wait for it to terminate.
 ///
 int ExecWait (const char * const argv[], const char * const envp[]);
+
+} // End llvm namespace
+
 #endif


Index: llvm/include/Support/Timer.h
diff -u llvm/include/Support/Timer.h:1.11 llvm/include/Support/Timer.h:1.12
--- llvm/include/Support/Timer.h:1.11	Mon Oct 20 14:46:57 2003
+++ llvm/include/Support/Timer.h	Tue Nov 11 16:41:29 2003
@@ -20,6 +20,8 @@
 #include <iosfwd>
 #include <cassert>
 
+namespace llvm {
+
 class TimerGroup;
 
 /// Timer - This class is used to track the amount of time spent between
@@ -156,5 +158,7 @@
     TimersToPrint.push_back(Timer(true, T));
   }
 };
+
+} // End llvm namespace
 
 #endif


Index: llvm/include/Support/Tree.h
diff -u llvm/include/Support/Tree.h:1.8 llvm/include/Support/Tree.h:1.9
--- llvm/include/Support/Tree.h:1.8	Mon Oct 20 14:46:57 2003
+++ llvm/include/Support/Tree.h	Tue Nov 11 16:41:29 2003
@@ -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 @@
   inline const Payload &getTreeData() const { return Data; }
 };
 
+} // End llvm namespace
 
 #endif


Index: llvm/include/Support/TypeInfo.h
diff -u llvm/include/Support/TypeInfo.h:1.4 llvm/include/Support/TypeInfo.h:1.5
--- llvm/include/Support/TypeInfo.h:1.4	Mon Oct 20 14:46:57 2003
+++ llvm/include/Support/TypeInfo.h	Tue Nov 11 16:41:29 2003
@@ -18,6 +18,8 @@
 
 #include <typeinfo>
 
+namespace llvm {
+
 struct TypeInfo {
   TypeInfo() {                     // needed for containers
     struct Nil {};  // Anonymous class distinct from all others...
@@ -68,5 +70,7 @@
 inline bool operator>=(const TypeInfo &lhs, const TypeInfo &rhs) {
   return !(lhs < rhs);
 }
+
+} // End llvm namespace
 
 #endif


Index: llvm/include/Support/VectorExtras.h
diff -u llvm/include/Support/VectorExtras.h:1.2 llvm/include/Support/VectorExtras.h:1.3
--- llvm/include/Support/VectorExtras.h:1.2	Mon Oct 20 14:46:57 2003
+++ llvm/include/Support/VectorExtras.h	Tue Nov 11 16:41:29 2003
@@ -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.
@@ -32,5 +34,7 @@
   va_end(Args);
   return Result;
 }
+
+} // End llvm namespace
 
 #endif


Index: llvm/include/Support/ilist
diff -u llvm/include/Support/ilist:1.14 llvm/include/Support/ilist:1.15
--- llvm/include/Support/ilist:1.14	Mon Oct 20 15:29:44 2003
+++ llvm/include/Support/ilist	Tue Nov 11 16:41:29 2003
@@ -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 @@
   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...





More information about the llvm-commits mailing list