diff options
author | Brian Gaeke <gaeke@uiuc.edu> | 2003-11-11 22:41:34 +0000 |
---|---|---|
committer | Brian Gaeke <gaeke@uiuc.edu> | 2003-11-11 22:41:34 +0000 |
commit | d0fde30ce850b78371fd1386338350591f9ff494 (patch) | |
tree | 83bb73e83f54fc8e1e474d116250ae2779562f7e /lib/ExecutionEngine | |
parent | 0d723acf15b0326e2df09ecb614b02a617f536e4 (diff) | |
download | external_llvm-d0fde30ce850b78371fd1386338350591f9ff494.zip external_llvm-d0fde30ce850b78371fd1386338350591f9ff494.tar.gz external_llvm-d0fde30ce850b78371fd1386338350591f9ff494.tar.bz2 |
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 'lib/ExecutionEngine')
-rw-r--r-- | lib/ExecutionEngine/ExecutionEngine.cpp | 3 | ||||
-rw-r--r-- | lib/ExecutionEngine/Interpreter/Execution.cpp | 6 | ||||
-rw-r--r-- | lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp | 4 | ||||
-rw-r--r-- | lib/ExecutionEngine/Interpreter/Interpreter.cpp | 4 | ||||
-rw-r--r-- | lib/ExecutionEngine/Interpreter/Interpreter.h | 4 | ||||
-rw-r--r-- | lib/ExecutionEngine/JIT/Intercept.cpp | 4 | ||||
-rw-r--r-- | lib/ExecutionEngine/JIT/JIT.cpp | 4 | ||||
-rw-r--r-- | lib/ExecutionEngine/JIT/JIT.h | 4 | ||||
-rw-r--r-- | lib/ExecutionEngine/JIT/JITEmitter.cpp | 4 | ||||
-rw-r--r-- | lib/ExecutionEngine/JIT/VM.cpp | 4 | ||||
-rw-r--r-- | lib/ExecutionEngine/JIT/VM.h | 4 |
11 files changed, 44 insertions, 1 deletions
diff --git a/lib/ExecutionEngine/ExecutionEngine.cpp b/lib/ExecutionEngine/ExecutionEngine.cpp index dd64724..b7da23c 100644 --- a/lib/ExecutionEngine/ExecutionEngine.cpp +++ b/lib/ExecutionEngine/ExecutionEngine.cpp @@ -27,6 +27,8 @@ #include "Support/DynamicLinker.h" #include "Config/dlfcn.h" +namespace llvm { + Statistic<> NumInitBytes("lli", "Number of bytes of global vars initialized"); ExecutionEngine::ExecutionEngine(ModuleProvider *P) : @@ -390,3 +392,4 @@ void ExecutionEngine::emitGlobals() { InitializeMemory(I->getInitializer(), GlobalAddress[I]); } +} // End llvm namespace 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 @@ void Interpreter::run() { 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 @@ void Interpreter::initializeExternalFunctions() { 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 @@ GenericValue Interpreter::run(Function *F, 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 @@ private: // Helper functions void popStackAndReturnValueToCaller(const Type *RetTy, GenericValue Result); }; +} // End llvm namespace + #endif diff --git a/lib/ExecutionEngine/JIT/Intercept.cpp b/lib/ExecutionEngine/JIT/Intercept.cpp index 6162e93..191b57d 100644 --- a/lib/ExecutionEngine/JIT/Intercept.cpp +++ b/lib/ExecutionEngine/JIT/Intercept.cpp @@ -19,6 +19,8 @@ #include "Support/DynamicLinker.h" #include <iostream> +namespace llvm { + // AtExitHandlers - List of functions to call when the program exits, // registered with the atexit() library function. static std::vector<void (*)()> AtExitHandlers; @@ -75,3 +77,5 @@ void *VM::getPointerToNamedFunction(const std::string &Name) { return Ptr; } + +} // End llvm namespace diff --git a/lib/ExecutionEngine/JIT/JIT.cpp b/lib/ExecutionEngine/JIT/JIT.cpp index fedb6e4..61d9629 100644 --- a/lib/ExecutionEngine/JIT/JIT.cpp +++ b/lib/ExecutionEngine/JIT/JIT.cpp @@ -24,6 +24,8 @@ #define NO_JITS_ENABLED #endif +namespace llvm { + namespace { enum ArchName { x86, Sparc }; @@ -118,3 +120,5 @@ GenericValue VM::run(Function *F, const std::vector<GenericValue> &ArgValues) rv.IntVal = ExitCode; return rv; } + +} // End llvm namespace diff --git a/lib/ExecutionEngine/JIT/JIT.h b/lib/ExecutionEngine/JIT/JIT.h index 685c4bd..9a17c96 100644 --- a/lib/ExecutionEngine/JIT/JIT.h +++ b/lib/ExecutionEngine/JIT/JIT.h @@ -18,6 +18,8 @@ #include "llvm/PassManager.h" #include <map> +namespace llvm { + class Function; class GlobalValue; class Constant; @@ -78,4 +80,6 @@ private: void runJITOnFunction (Function *F); }; +} // End llvm namespace + #endif diff --git a/lib/ExecutionEngine/JIT/JITEmitter.cpp b/lib/ExecutionEngine/JIT/JITEmitter.cpp index 98f526a..32d0651 100644 --- a/lib/ExecutionEngine/JIT/JITEmitter.cpp +++ b/lib/ExecutionEngine/JIT/JITEmitter.cpp @@ -27,6 +27,8 @@ #include "Config/unistd.h" #include "Config/sys/mman.h" +namespace llvm { + namespace { Statistic<> NumBytes("jit", "Number of bytes of machine code compiled"); VM *TheVM = 0; @@ -265,3 +267,5 @@ extern "C" { return TheVM->getPointerToNamedFunction(Name); } } + +} // End llvm namespace diff --git a/lib/ExecutionEngine/JIT/VM.cpp b/lib/ExecutionEngine/JIT/VM.cpp index 2dda271..d7e7685 100644 --- a/lib/ExecutionEngine/JIT/VM.cpp +++ b/lib/ExecutionEngine/JIT/VM.cpp @@ -19,6 +19,8 @@ #include "llvm/CodeGen/MachineCodeEmitter.h" #include "llvm/Target/TargetMachine.h" +namespace llvm { + VM::~VM() { delete MCE; delete &TM; @@ -98,3 +100,5 @@ void *VM::recompileAndRelinkFunction(Function *F) { TM.replaceMachineCodeForFunction (OldAddr, Addr); return Addr; } + +} // End llvm namespace diff --git a/lib/ExecutionEngine/JIT/VM.h b/lib/ExecutionEngine/JIT/VM.h index 685c4bd..9a17c96 100644 --- a/lib/ExecutionEngine/JIT/VM.h +++ b/lib/ExecutionEngine/JIT/VM.h @@ -18,6 +18,8 @@ #include "llvm/PassManager.h" #include <map> +namespace llvm { + class Function; class GlobalValue; class Constant; @@ -78,4 +80,6 @@ private: void runJITOnFunction (Function *F); }; +} // End llvm namespace + #endif |