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
diff --git a/lib/ExecutionEngine/Interpreter/Execution.cpp b/lib/ExecutionEngine/Interpreter/Execution.cpp
index b04f974..aa32983 100644
--- a/lib/ExecutionEngine/Interpreter/Execution.cpp
+++ b/lib/ExecutionEngine/Interpreter/Execution.cpp
@@ -18,12 +18,14 @@
#include "Support/Statistic.h"
#include <cmath> // For fmod
-Interpreter *TheEE = 0;
+namespace llvm {
namespace {
Statistic<> NumDynamicInsts("lli", "Number of dynamic instructions executed");
}
+Interpreter *TheEE = 0;
+
//===----------------------------------------------------------------------===//
// Value Manipulation code
//===----------------------------------------------------------------------===//
@@ -910,3 +912,5 @@
visit(I); // Dispatch to one of the visit* methods...
}
}
+
+} // End llvm namespace
diff --git a/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp b/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
index ecf19c2..f516f5d 100644
--- a/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
+++ b/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
@@ -32,6 +32,8 @@
#include <map>
using std::vector;
+namespace llvm {
+
typedef GenericValue (*ExFunc)(FunctionType *, const vector<GenericValue> &);
static std::map<const Function *, ExFunc> Functions;
static std::map<std::string, ExFunc> FuncNames;
@@ -767,3 +769,5 @@
FuncNames["lle_X_llvm.va_end"] = llvm_va_end;
FuncNames["lle_X_llvm.va_copy"] = llvm_va_copy;
}
+
+} // End llvm namespace
diff --git a/lib/ExecutionEngine/Interpreter/Interpreter.cpp b/lib/ExecutionEngine/Interpreter/Interpreter.cpp
index bcaa856..bb14cd2 100644
--- a/lib/ExecutionEngine/Interpreter/Interpreter.cpp
+++ b/lib/ExecutionEngine/Interpreter/Interpreter.cpp
@@ -17,6 +17,8 @@
#include "llvm/Module.h"
#include "llvm/DerivedTypes.h"
+namespace llvm {
+
/// create - Create a new interpreter object. This can never fail.
///
ExecutionEngine *Interpreter::create(Module *M){
@@ -97,3 +99,5 @@
rv.IntVal = ExitCode;
return rv;
}
+
+} // End llvm namespace
diff --git a/lib/ExecutionEngine/Interpreter/Interpreter.h b/lib/ExecutionEngine/Interpreter/Interpreter.h
index 00784ad..e9015a2 100644
--- a/lib/ExecutionEngine/Interpreter/Interpreter.h
+++ b/lib/ExecutionEngine/Interpreter/Interpreter.h
@@ -22,6 +22,8 @@
#include "llvm/Target/TargetData.h"
#include "Support/DataTypes.h"
+namespace llvm {
+
struct FunctionInfo; // Defined in ExecutionAnnotations.h
// AllocaHolder - Object to track all of the blocks of memory allocated by
@@ -166,4 +168,6 @@
void popStackAndReturnValueToCaller(const Type *RetTy, GenericValue Result);
};
+} // End llvm namespace
+
#endif