aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Support
diff options
context:
space:
mode:
authorBrian Gaeke <gaeke@uiuc.edu>2003-11-11 22:41:34 +0000
committerBrian Gaeke <gaeke@uiuc.edu>2003-11-11 22:41:34 +0000
commitd0fde30ce850b78371fd1386338350591f9ff494 (patch)
tree83bb73e83f54fc8e1e474d116250ae2779562f7e /include/llvm/Support
parent0d723acf15b0326e2df09ecb614b02a617f536e4 (diff)
downloadexternal_llvm-d0fde30ce850b78371fd1386338350591f9ff494.tar.gz
external_llvm-d0fde30ce850b78371fd1386338350591f9ff494.tar.bz2
external_llvm-d0fde30ce850b78371fd1386338350591f9ff494.zip
Put all LLVM code into the llvm namespace, as per bug 109.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support')
-rw-r--r--include/llvm/Support/Annotation.h4
-rw-r--r--include/llvm/Support/CFG.h4
-rw-r--r--include/llvm/Support/CallSite.h4
-rw-r--r--include/llvm/Support/Casting.h4
-rw-r--r--include/llvm/Support/CommandLine.h3
-rw-r--r--include/llvm/Support/ConstantRange.h5
-rw-r--r--include/llvm/Support/DOTGraphTraits.h4
-rw-r--r--include/llvm/Support/Debug.h4
-rw-r--r--include/llvm/Support/DynamicLinker.h4
-rw-r--r--include/llvm/Support/FileUtilities.h4
-rw-r--r--include/llvm/Support/GraphWriter.h4
-rw-r--r--include/llvm/Support/InstIterator.h4
-rw-r--r--include/llvm/Support/InstVisitor.h5
-rw-r--r--include/llvm/Support/LeakDetector.h5
-rw-r--r--include/llvm/Support/Linker.h5
-rw-r--r--include/llvm/Support/MallocAllocator.h3
-rw-r--r--include/llvm/Support/Mangler.h9
-rw-r--r--include/llvm/Support/MathExtras.h4
-rw-r--r--include/llvm/Support/PassNameParser.h4
-rw-r--r--include/llvm/Support/SystemUtils.h5
-rw-r--r--include/llvm/Support/Timer.h4
-rw-r--r--include/llvm/Support/ToolRunner.h4
-rw-r--r--include/llvm/Support/TypeInfo.h4
-rw-r--r--include/llvm/Support/ValueHolder.h4
24 files changed, 103 insertions, 1 deletions
diff --git a/include/llvm/Support/Annotation.h b/include/llvm/Support/Annotation.h
index 075ffc297a..cee7ab7d89 100644
--- a/include/llvm/Support/Annotation.h
+++ b/include/llvm/Support/Annotation.h
@@ -25,6 +25,8 @@
#include <string>
#include <cassert>
+namespace llvm {
+
class AnnotationID;
class Annotation;
class Annotable;
@@ -217,4 +219,6 @@ inline Annotation *Annotable::getOrCreateAnnotation(AnnotationID ID) const {
return A;
}
+} // End namespace llvm
+
#endif
diff --git a/include/llvm/Support/CFG.h b/include/llvm/Support/CFG.h
index 26616dbb7a..bbe1701da1 100644
--- a/include/llvm/Support/CFG.h
+++ b/include/llvm/Support/CFG.h
@@ -20,6 +20,8 @@
#include "llvm/InstrTypes.h"
#include "Support/iterator"
+namespace llvm {
+
//===--------------------------------------------------------------------===//
// BasicBlock pred_iterator definition
//===--------------------------------------------------------------------===//
@@ -264,4 +266,6 @@ template <> struct GraphTraits<Inverse<const Function*> > :
}
};
+} // End llvm namespace
+
#endif
diff --git a/include/llvm/Support/CallSite.h b/include/llvm/Support/CallSite.h
index 5e3fd3e662..8f7cf1a786 100644
--- a/include/llvm/Support/CallSite.h
+++ b/include/llvm/Support/CallSite.h
@@ -23,6 +23,8 @@
#include "llvm/Instruction.h"
+namespace llvm {
+
class CallInst;
class InvokeInst;
@@ -100,4 +102,6 @@ public:
}
};
+} // End llvm namespace
+
#endif
diff --git a/include/llvm/Support/Casting.h b/include/llvm/Support/Casting.h
index 065919c179..4b070c18d8 100644
--- a/include/llvm/Support/Casting.h
+++ b/include/llvm/Support/Casting.h
@@ -15,6 +15,8 @@
#ifndef SUPPORT_CASTING_H
#define SUPPORT_CASTING_H
+namespace llvm {
+
//===----------------------------------------------------------------------===//
// isa<x> Support Templates
//===----------------------------------------------------------------------===//
@@ -293,4 +295,6 @@ void main() {
#endif
+} // End llvm namespace
+
#endif
diff --git a/include/llvm/Support/CommandLine.h b/include/llvm/Support/CommandLine.h
index 01f55a81d4..df40d80070 100644
--- a/include/llvm/Support/CommandLine.h
+++ b/include/llvm/Support/CommandLine.h
@@ -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.
@@ -1022,4 +1023,6 @@ struct aliasopt {
} // End namespace cl
+} // End namespace llvm
+
#endif
diff --git a/include/llvm/Support/ConstantRange.h b/include/llvm/Support/ConstantRange.h
index c173549a37..d97b73e824 100644
--- a/include/llvm/Support/ConstantRange.h
+++ b/include/llvm/Support/ConstantRange.h
@@ -26,6 +26,9 @@
#include "Support/DataTypes.h"
#include <iosfwd>
+
+namespace llvm {
+
class ConstantIntegral;
class Type;
@@ -124,4 +127,6 @@ inline std::ostream &operator<<(std::ostream &OS, const ConstantRange &CR) {
return OS;
}
+} // End llvm namespace
+
#endif
diff --git a/include/llvm/Support/DOTGraphTraits.h b/include/llvm/Support/DOTGraphTraits.h
index 002a78ec4f..63837b7ddf 100644
--- a/include/llvm/Support/DOTGraphTraits.h
+++ b/include/llvm/Support/DOTGraphTraits.h
@@ -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
@@ -96,4 +98,6 @@ struct DefaultDOTGraphTraits {
template <typename Ty>
class DOTGraphTraits : public DefaultDOTGraphTraits {};
+} // End llvm namespace
+
#endif
diff --git a/include/llvm/Support/Debug.h b/include/llvm/Support/Debug.h
index 8cba05771f..66a208811a 100644
--- a/include/llvm/Support/Debug.h
+++ b/include/llvm/Support/Debug.h
@@ -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.
@@ -57,4 +59,6 @@ bool isCurrentDebugType(const char *Type);
do { if (DebugFlag && isCurrentDebugType(DEBUG_TYPE)) { X; } } while (0)
#endif
+} // End llvm namespace
+
#endif
diff --git a/include/llvm/Support/DynamicLinker.h b/include/llvm/Support/DynamicLinker.h
index 8f02708268..fec9a45296 100644
--- a/include/llvm/Support/DynamicLinker.h
+++ b/include/llvm/Support/DynamicLinker.h
@@ -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
@@ -33,4 +35,6 @@ bool LinkDynamicObject (const char *filename, std::string *ErrorMessage);
void *GetAddressOfSymbol (const char *symbolName);
void *GetAddressOfSymbol (const std::string &symbolName);
+} // End llvm namespace
+
#endif // SUPPORT_DYNAMICLINKER_H
diff --git a/include/llvm/Support/FileUtilities.h b/include/llvm/Support/FileUtilities.h
index 0dfa625362..c276ec7aaa 100644
--- a/include/llvm/Support/FileUtilities.h
+++ b/include/llvm/Support/FileUtilities.h
@@ -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.
///
@@ -95,4 +97,6 @@ bool MakeFileExecutable (const std::string & Filename);
///
bool MakeFileReadable (const std::string & Filename);
+} // End llvm namespace
+
#endif
diff --git a/include/llvm/Support/GraphWriter.h b/include/llvm/Support/GraphWriter.h
index 2cb8fcc985..7e5aa80645 100644
--- a/include/llvm/Support/GraphWriter.h
+++ b/include/llvm/Support/GraphWriter.h
@@ -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);
@@ -206,4 +208,6 @@ std::ostream &WriteGraph(std::ostream &O, const GraphType &G,
return O;
}
+} // End llvm namespace
+
#endif
diff --git a/include/llvm/Support/InstIterator.h b/include/llvm/Support/InstIterator.h
index 4c2d185576..31c8b660d6 100644
--- a/include/llvm/Support/InstIterator.h
+++ b/include/llvm/Support/InstIterator.h
@@ -22,6 +22,8 @@
#include "llvm/BasicBlock.h"
#include "llvm/Function.h"
+namespace llvm {
+
// This class implements inst_begin() & inst_end() for
// inst_iterator and const_inst_iterator's.
//
@@ -137,4 +139,6 @@ inline const_inst_iterator inst_end(const Function &F) {
return const_inst_iterator(F, true);
}
+} // End llvm namespace
+
#endif
diff --git a/include/llvm/Support/InstVisitor.h b/include/llvm/Support/InstVisitor.h
index de1bce96bb..9a34edb71f 100644
--- a/include/llvm/Support/InstVisitor.h
+++ b/include/llvm/Support/InstVisitor.h
@@ -52,6 +52,8 @@
#include "llvm/Instruction.h"
+namespace llvm {
+
class Module;
// We operate on opaque instruction classes, so forward declare all instruction
@@ -64,7 +66,6 @@ class Module;
class TerminatorInst; class BinaryOperator;
class AllocationInst;
-
#define DELEGATE(CLASS_TO_VISIT) \
return ((SubClass*)this)->visit##CLASS_TO_VISIT((CLASS_TO_VISIT&)I)
@@ -186,4 +187,6 @@ struct InstVisitor {
#undef DELEGATE
+} // End llvm namespace
+
#endif
diff --git a/include/llvm/Support/LeakDetector.h b/include/llvm/Support/LeakDetector.h
index b39e0b5911..e2ce9c50be 100644
--- a/include/llvm/Support/LeakDetector.h
+++ b/include/llvm/Support/LeakDetector.h
@@ -23,6 +23,9 @@
#define SUPPORT_LEAKDETECTOR_H
#include <string>
+
+namespace llvm {
+
class Value;
struct LeakDetector {
@@ -83,4 +86,6 @@ private:
static void checkForGarbageImpl(const std::string &Message);
};
+} // End llvm namespace
+
#endif
diff --git a/include/llvm/Support/Linker.h b/include/llvm/Support/Linker.h
index ac399034d4..9f4c8c25f6 100644
--- a/include/llvm/Support/Linker.h
+++ b/include/llvm/Support/Linker.h
@@ -15,6 +15,9 @@
#define LLVM_TRANSFORMATIONS_UTILS_LINKER_H
#include <string>
+
+namespace llvm {
+
class Module;
// LinkModules - This function links two modules together, with the resulting
@@ -24,5 +27,7 @@ class Module;
//
bool LinkModules(Module *Dest, const Module *Src, std::string *ErrorMsg = 0);
+} // End llvm namespace
+
#endif
diff --git a/include/llvm/Support/MallocAllocator.h b/include/llvm/Support/MallocAllocator.h
index 1ba25b0d65..766a67fa22 100644
--- a/include/llvm/Support/MallocAllocator.h
+++ b/include/llvm/Support/MallocAllocator.h
@@ -23,6 +23,8 @@
#include <cstdlib>
#include <memory>
+namespace llvm {
+
template<typename T>
struct MallocAllocator {
typedef size_t size_type;
@@ -79,5 +81,6 @@ namespace std {
};
}
+} // End llvm namespace
#endif
diff --git a/include/llvm/Support/Mangler.h b/include/llvm/Support/Mangler.h
index 1f56ff319e..5b312f8ef4 100644
--- a/include/llvm/Support/Mangler.h
+++ b/include/llvm/Support/Mangler.h
@@ -14,12 +14,19 @@
#ifndef LLVM_SUPPORT_MANGLER_H
#define LLVM_SUPPORT_MANGLER_H
+namespace llvm {
+
class Value;
class Module;
+
+} // End llvm namespace
+
#include <map>
#include <set>
#include <string>
+namespace llvm {
+
class Mangler {
/// This keeps track of which global values have had their names
/// mangled in the current module.
@@ -54,4 +61,6 @@ public:
static std::string makeNameProper(const std::string &x);
};
+} // End llvm namespace
+
#endif // LLVM_SUPPORT_MANGLER_H
diff --git a/include/llvm/Support/MathExtras.h b/include/llvm/Support/MathExtras.h
index ec742324b0..74958fbc35 100644
--- a/include/llvm/Support/MathExtras.h
+++ b/include/llvm/Support/MathExtras.h
@@ -16,6 +16,8 @@
#include "Support/DataTypes.h"
+namespace llvm {
+
inline unsigned log2(uint64_t C) {
unsigned getPow;
for (getPow = 0; C > 1; ++getPow)
@@ -33,4 +35,6 @@ inline bool isPowerOf2(int64_t C, unsigned &getPow) {
return false;
}
+} // End llvm namespace
+
#endif
diff --git a/include/llvm/Support/PassNameParser.h b/include/llvm/Support/PassNameParser.h
index f63666ba66..0ffcabad52 100644
--- a/include/llvm/Support/PassNameParser.h
+++ b/include/llvm/Support/PassNameParser.h
@@ -28,6 +28,8 @@
#include <algorithm>
#include <iostream>
+namespace llvm {
+
//===----------------------------------------------------------------------===//
// PassNameParser class - Make use of the pass registration mechanism to
// automatically add a command line argument to opt for each pass.
@@ -114,4 +116,6 @@ struct FilteredPassNameParser : public PassNameParser {
}
};
+} // End llvm namespace
+
#endif
diff --git a/include/llvm/Support/SystemUtils.h b/include/llvm/Support/SystemUtils.h
index ccde86cce6..c874d9932c 100644
--- a/include/llvm/Support/SystemUtils.h
+++ b/include/llvm/Support/SystemUtils.h
@@ -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 @@ int RunProgramWithTimeout(const std::string &ProgramPath, const char **Args,
/// wait for it to terminate.
///
int ExecWait (const char * const argv[], const char * const envp[]);
+
+} // End llvm namespace
+
#endif
diff --git a/include/llvm/Support/Timer.h b/include/llvm/Support/Timer.h
index 57ef3f0d64..ac465bb95b 100644
--- a/include/llvm/Support/Timer.h
+++ b/include/llvm/Support/Timer.h
@@ -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
@@ -157,4 +159,6 @@ private:
}
};
+} // End llvm namespace
+
#endif
diff --git a/include/llvm/Support/ToolRunner.h b/include/llvm/Support/ToolRunner.h
index e23ec7f312..8ce3f5d8f3 100644
--- a/include/llvm/Support/ToolRunner.h
+++ b/include/llvm/Support/ToolRunner.h
@@ -20,6 +20,8 @@
#include "Support/SystemUtils.h"
#include <vector>
+namespace llvm {
+
class CBE;
class LLC;
@@ -137,4 +139,6 @@ public:
int OutputAsm(const std::string &Bytecode, std::string &OutputAsmFile);
};
+} // End llvm namespace
+
#endif
diff --git a/include/llvm/Support/TypeInfo.h b/include/llvm/Support/TypeInfo.h
index aa2093a43d..5d9035076f 100644
--- a/include/llvm/Support/TypeInfo.h
+++ b/include/llvm/Support/TypeInfo.h
@@ -18,6 +18,8 @@
#include <typeinfo>
+namespace llvm {
+
struct TypeInfo {
TypeInfo() { // needed for containers
struct Nil {}; // Anonymous class distinct from all others...
@@ -69,4 +71,6 @@ inline bool operator>=(const TypeInfo &lhs, const TypeInfo &rhs) {
return !(lhs < rhs);
}
+} // End llvm namespace
+
#endif
diff --git a/include/llvm/Support/ValueHolder.h b/include/llvm/Support/ValueHolder.h
index 62ab9d9ca2..bab201287e 100644
--- a/include/llvm/Support/ValueHolder.h
+++ b/include/llvm/Support/ValueHolder.h
@@ -20,6 +20,8 @@
#include "llvm/User.h"
+namespace llvm {
+
struct ValueHolder : public User {
ValueHolder(Value *V = 0);
ValueHolder(const ValueHolder &VH) : User(VH.getType(), Value::TypeVal) {
@@ -46,4 +48,6 @@ struct ValueHolder : public User {
}
};
+} // End llvm namespace
+
#endif