[llvm-commits] CVS: llvm/lib/Support/Annotation.cpp CommandLine.cpp ConstantRange.cpp Debug.cpp DynamicLinker.cpp FileUtilities.cpp LeakDetector.cpp Mangler.cpp PluginLoader.cpp Signals.cpp Statistic.cpp SystemUtils.cpp Timer.cpp ToolRunner.cpp ValueHolder.cpp

Brian Gaeke gaeke at cs.uiuc.edu
Tue Nov 11 16:43:24 PST 2003


Changes in directory llvm/lib/Support:

Annotation.cpp updated: 1.11 -> 1.12
CommandLine.cpp updated: 1.40 -> 1.41
ConstantRange.cpp updated: 1.6 -> 1.7
Debug.cpp updated: 1.3 -> 1.4
DynamicLinker.cpp updated: 1.3 -> 1.4
FileUtilities.cpp updated: 1.10 -> 1.11
LeakDetector.cpp updated: 1.4 -> 1.5
Mangler.cpp updated: 1.6 -> 1.7
PluginLoader.cpp updated: 1.6 -> 1.7
Signals.cpp updated: 1.9 -> 1.10
Statistic.cpp updated: 1.11 -> 1.12
SystemUtils.cpp updated: 1.18 -> 1.19
Timer.cpp updated: 1.27 -> 1.28
ToolRunner.cpp updated: 1.10 -> 1.11
ValueHolder.cpp updated: 1.2 -> 1.3

---
Log message:

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

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

Index: llvm/lib/Support/Annotation.cpp
diff -u llvm/lib/Support/Annotation.cpp:1.11 llvm/lib/Support/Annotation.cpp:1.12
--- llvm/lib/Support/Annotation.cpp:1.11	Mon Oct 20 14:43:16 2003
+++ llvm/lib/Support/Annotation.cpp	Tue Nov 11 16:41:33 2003
@@ -14,6 +14,8 @@
 #include <map>
 #include "Support/Annotation.h"
 
+namespace llvm {
+
 typedef std::map<const std::string, unsigned> IDMapType;
 static unsigned IDCounter = 0;  // Unique ID counter
 
@@ -94,3 +96,5 @@
   if (I == getFactMap().end()) return 0;
   return I->second.first(ID, Obj, I->second.second);
 }
+
+} // End llvm namespace


Index: llvm/lib/Support/CommandLine.cpp
diff -u llvm/lib/Support/CommandLine.cpp:1.40 llvm/lib/Support/CommandLine.cpp:1.41
--- llvm/lib/Support/CommandLine.cpp:1.40	Mon Oct 20 14:43:16 2003
+++ llvm/lib/Support/CommandLine.cpp	Tue Nov 11 16:41:33 2003
@@ -24,6 +24,8 @@
 #include <cstdlib>
 #include <cerrno>
 
+namespace llvm {
+
 using namespace cl;
 
 //===----------------------------------------------------------------------===//
@@ -887,3 +889,5 @@
      cl::location(HiddenPrinter), cl::Hidden, cl::ValueDisallowed);
 
 } // End anonymous namespace
+
+} // End llvm namespace


Index: llvm/lib/Support/ConstantRange.cpp
diff -u llvm/lib/Support/ConstantRange.cpp:1.6 llvm/lib/Support/ConstantRange.cpp:1.7
--- llvm/lib/Support/ConstantRange.cpp:1.6	Mon Oct 20 14:43:16 2003
+++ llvm/lib/Support/ConstantRange.cpp	Tue Nov 11 16:41:33 2003
@@ -26,6 +26,8 @@
 #include "llvm/Instruction.h"
 #include "llvm/ConstantHandling.h"
 
+namespace llvm {
+
 /// Initialize a full (the default) or empty set for the specified type.
 ///
 ConstantRange::ConstantRange(const Type *Ty, bool Full) {
@@ -248,3 +250,5 @@
 void ConstantRange::dump() const {
   print(std::cerr);
 }
+
+} // End llvm namespace


Index: llvm/lib/Support/Debug.cpp
diff -u llvm/lib/Support/Debug.cpp:1.3 llvm/lib/Support/Debug.cpp:1.4
--- llvm/lib/Support/Debug.cpp:1.3	Mon Oct 20 14:43:16 2003
+++ llvm/lib/Support/Debug.cpp	Tue Nov 11 16:41:33 2003
@@ -26,6 +26,8 @@
 #include "Support/Statistic.h"
 #include "Support/CommandLine.h"
 
+namespace llvm {
+
 bool DebugFlag;  // DebugFlag - Exported boolean set by the -debug option
 
 namespace {
@@ -62,3 +64,5 @@
   return false;
 #endif
 }
+
+} // End llvm namespace


Index: llvm/lib/Support/DynamicLinker.cpp
diff -u llvm/lib/Support/DynamicLinker.cpp:1.3 llvm/lib/Support/DynamicLinker.cpp:1.4
--- llvm/lib/Support/DynamicLinker.cpp:1.3	Sat Oct 25 11:55:32 2003
+++ llvm/lib/Support/DynamicLinker.cpp	Tue Nov 11 16:41:33 2003
@@ -23,6 +23,8 @@
 #include "Config/dlfcn.h"
 #include <cassert>
 
+namespace llvm {
+
 bool LinkDynamicObject (const char *filename, std::string *ErrorMessage) {
 #if defined (HAVE_DLOPEN)
   if (dlopen (filename, RTLD_NOW | RTLD_GLOBAL) == 0) {
@@ -52,3 +54,5 @@
 void *GetAddressOfSymbol (const std::string &symbolName) {
   return GetAddressOfSymbol (symbolName.c_str ());
 }
+
+} // End llvm namespace


Index: llvm/lib/Support/FileUtilities.cpp
diff -u llvm/lib/Support/FileUtilities.cpp:1.10 llvm/lib/Support/FileUtilities.cpp:1.11
--- llvm/lib/Support/FileUtilities.cpp:1.10	Tue Nov 11 15:53:50 2003
+++ llvm/lib/Support/FileUtilities.cpp	Tue Nov 11 16:41:33 2003
@@ -20,6 +20,9 @@
 #include <iostream>
 #include <cstdio>
 
+namespace llvm
+{
+
 /// CheckMagic - Returns true IFF the file named FN begins with Magic. FN must
 /// name a readable file.
 ///
@@ -182,3 +185,5 @@
 bool MakeFileReadable (const std::string &Filename) {
   return AddPermissionsBits (Filename, 0444);
 }
+
+} // End llvm namespace


Index: llvm/lib/Support/LeakDetector.cpp
diff -u llvm/lib/Support/LeakDetector.cpp:1.4 llvm/lib/Support/LeakDetector.cpp:1.5
--- llvm/lib/Support/LeakDetector.cpp:1.4	Mon Oct 20 14:43:16 2003
+++ llvm/lib/Support/LeakDetector.cpp	Tue Nov 11 16:41:33 2003
@@ -15,6 +15,8 @@
 #include "llvm/Value.h"
 #include <set>
 
+namespace llvm {
+
 // Lazily allocate set so that release build doesn't have to do anything.
 static std::set<const void*> *Objects = 0;
 static std::set<const Value*> *LLVMObjects = 0;
@@ -87,3 +89,5 @@
     Objects = 0; LLVMObjects = 0;
   }
 }
+
+} // End llvm namespace


Index: llvm/lib/Support/Mangler.cpp
diff -u llvm/lib/Support/Mangler.cpp:1.6 llvm/lib/Support/Mangler.cpp:1.7
--- llvm/lib/Support/Mangler.cpp:1.6	Mon Oct 20 14:43:16 2003
+++ llvm/lib/Support/Mangler.cpp	Tue Nov 11 16:41:33 2003
@@ -16,6 +16,8 @@
 #include "llvm/Type.h"
 #include "Support/StringExtras.h"
 
+namespace llvm {
+
 static char HexDigit(int V) {
   return V < 10 ? V+'0' : V+'A'-10;
 }
@@ -99,3 +101,4 @@
         FoundNames.insert(I->getName());   // Otherwise, keep track of name
 }
 
+} // End llvm namespace


Index: llvm/lib/Support/PluginLoader.cpp
diff -u llvm/lib/Support/PluginLoader.cpp:1.6 llvm/lib/Support/PluginLoader.cpp:1.7
--- llvm/lib/Support/PluginLoader.cpp:1.6	Mon Oct 20 14:43:16 2003
+++ llvm/lib/Support/PluginLoader.cpp	Tue Nov 11 16:41:33 2003
@@ -23,6 +23,8 @@
 #include "Config/link.h"
 #include <iostream>
 
+namespace llvm {
+
 namespace {
   struct PluginLoader {
     void operator=(const std::string &Filename) {
@@ -38,3 +40,5 @@
 static cl::opt<PluginLoader, false, cl::parser<std::string> >
 LoadOpt("load", cl::ZeroOrMore, cl::value_desc("plugin.so"),
         cl::desc("Load the specified plugin"));
+
+} // End llvm namespace


Index: llvm/lib/Support/Signals.cpp
diff -u llvm/lib/Support/Signals.cpp:1.9 llvm/lib/Support/Signals.cpp:1.10
--- llvm/lib/Support/Signals.cpp:1.9	Mon Oct 20 14:43:16 2003
+++ llvm/lib/Support/Signals.cpp	Tue Nov 11 16:41:33 2003
@@ -20,6 +20,8 @@
 #include <signal.h>
 #include "Config/config.h"     // Get the signal handler return type
 
+namespace llvm {
+
 static std::vector<std::string> FilesToRemove;
 
 // IntSigs - Signals that may interrupt the program at any time.
@@ -62,3 +64,5 @@
   std::for_each(IntSigs, IntSigsEnd, RegisterHandler);
   std::for_each(KillSigs, KillSigsEnd, RegisterHandler);
 }
+
+} // End llvm namespace


Index: llvm/lib/Support/Statistic.cpp
diff -u llvm/lib/Support/Statistic.cpp:1.11 llvm/lib/Support/Statistic.cpp:1.12
--- llvm/lib/Support/Statistic.cpp:1.11	Mon Oct 20 14:43:16 2003
+++ llvm/lib/Support/Statistic.cpp	Tue Nov 11 16:41:33 2003
@@ -27,8 +27,10 @@
 #include <iostream>
 #include <algorithm>
 
+namespace llvm {
+
 // GetLibSupportInfoOutputFile - Return a file stream to print our output on...
-std::ostream *GetLibSupportInfoOutputFile();
+extern std::ostream *GetLibSupportInfoOutputFile();
 
 unsigned StatisticBase::NumStats = 0;
 
@@ -104,3 +106,5 @@
       delete OutStream;   // Close the file...
   }
 }
+
+} // End llvm namespace


Index: llvm/lib/Support/SystemUtils.cpp
diff -u llvm/lib/Support/SystemUtils.cpp:1.18 llvm/lib/Support/SystemUtils.cpp:1.19
--- llvm/lib/Support/SystemUtils.cpp:1.18	Mon Oct 20 14:43:16 2003
+++ llvm/lib/Support/SystemUtils.cpp	Tue Nov 11 16:41:33 2003
@@ -24,6 +24,8 @@
 #include "Config/unistd.h"
 #include "Config/errno.h"
 
+namespace llvm {
+
 /// isExecutableFile - This function returns true if the filename specified
 /// exists and is executable.
 ///
@@ -272,3 +274,4 @@
   return 1;
 }
 
+} // End llvm namespace


Index: llvm/lib/Support/Timer.cpp
diff -u llvm/lib/Support/Timer.cpp:1.27 llvm/lib/Support/Timer.cpp:1.28
--- llvm/lib/Support/Timer.cpp:1.27	Mon Oct 20 14:43:16 2003
+++ llvm/lib/Support/Timer.cpp	Tue Nov 11 16:41:33 2003
@@ -23,6 +23,8 @@
 #include <fstream>
 #include <map>
 
+namespace llvm {
+
 // getLibSupportInfoOutputFilename - This ugly hack is brought to you courtesy
 // of constructor/destructor ordering being unspecified by C++.  Basically the
 // problem is that a Statistic<> object gets destroyed, which ends up calling
@@ -265,7 +267,8 @@
 }
 
 // GetLibSupportInfoOutputFile - Return a file stream to print our output on...
-std::ostream *GetLibSupportInfoOutputFile() {
+std::ostream *
+GetLibSupportInfoOutputFile() {
   std::string &LibSupportInfoOutputFilename = getLibSupportInfoOutputFilename();
   if (LibSupportInfoOutputFilename.empty())
     return &std::cerr;
@@ -349,3 +352,5 @@
     DefaultTimerGroup = 0;
   }
 }
+
+} // End llvm namespace


Index: llvm/lib/Support/ToolRunner.cpp
diff -u llvm/lib/Support/ToolRunner.cpp:1.10 llvm/lib/Support/ToolRunner.cpp:1.11
--- llvm/lib/Support/ToolRunner.cpp:1.10	Mon Oct 20 14:43:16 2003
+++ llvm/lib/Support/ToolRunner.cpp	Tue Nov 11 16:41:33 2003
@@ -18,6 +18,8 @@
 #include <iostream>
 #include <fstream>
 
+namespace llvm {
+
 //===---------------------------------------------------------------------===//
 // LLI Implementation of AbstractIntepreter interface
 //
@@ -391,3 +393,5 @@
   Message = "Found gcc: " + GCCPath + "\n";
   return new GCC(GCCPath);
 }
+
+} // End llvm namespace


Index: llvm/lib/Support/ValueHolder.cpp
diff -u llvm/lib/Support/ValueHolder.cpp:1.2 llvm/lib/Support/ValueHolder.cpp:1.3
--- llvm/lib/Support/ValueHolder.cpp:1.2	Mon Oct 20 14:43:16 2003
+++ llvm/lib/Support/ValueHolder.cpp	Tue Nov 11 16:41:33 2003
@@ -18,6 +18,10 @@
 #include "llvm/Support/ValueHolder.h"
 #include "llvm/Type.h"
 
+namespace llvm {
+
 ValueHolder::ValueHolder(Value *V) : User(Type::TypeTy, Value::TypeVal) {
   Operands.push_back(Use(V, this));
 }
+
+} // End llvm namespace





More information about the llvm-commits mailing list