Rename Reactor namespace to rr.
We were using sw, the namespace used in the rest of SwiftShader, as the
namespace for Reactor. Putting Reactor code into its own namespace
makes it easier to untangle dependencies.
Bug swiftshader:16
Bug b/115344057
Change-Id: Iea4e049a4796323bf80b4f5e6e17778ccf17b995
Reviewed-on: https://swiftshader-review.googlesource.com/c/21308
Reviewed-by: Alexis Hétu <sugoi@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/src/Reactor/LLVMReactor.cpp b/src/Reactor/LLVMReactor.cpp
index 92e4586..b702ec9 100644
--- a/src/Reactor/LLVMReactor.cpp
+++ b/src/Reactor/LLVMReactor.cpp
@@ -107,14 +107,14 @@
}
#endif
-namespace sw
+namespace rr
{
class LLVMReactorJIT;
}
namespace
{
- sw::LLVMReactorJIT *reactorJIT = nullptr;
+ rr::LLVMReactorJIT *reactorJIT = nullptr;
llvm::IRBuilder<> *builder = nullptr;
llvm::LLVMContext *context = nullptr;
llvm::Module *module = nullptr;
@@ -441,24 +441,26 @@
#endif // SWIFTSHADER_LLVM_VERSION >= 7
}
-namespace sw
+namespace rr
{
+ using namespace sw;
+
#if SWIFTSHADER_LLVM_VERSION < 7
class LLVMReactorJIT
{
private:
std::string arch;
llvm::SmallVector<std::string, 16> mattrs;
- sw::LLVMRoutineManager *routineManager;
llvm::ExecutionEngine *executionEngine;
+ LLVMRoutineManager *routineManager;
public:
LLVMReactorJIT(const std::string &arch_,
const llvm::SmallVectorImpl<std::string> &mattrs_) :
arch(arch_),
mattrs(mattrs_.begin(), mattrs_.end()),
- routineManager(nullptr),
- executionEngine(nullptr)
+ executionEngine(nullptr),
+ routineManager(nullptr)
{
}
@@ -6910,7 +6912,7 @@
}
}
-namespace sw
+namespace rr
{
#if defined(__i386__) || defined(__x86_64__)
namespace x86