summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ExecutionEngine/Orc/OrcTestCommon.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/unittests/ExecutionEngine/Orc/OrcTestCommon.h')
-rw-r--r--llvm/unittests/ExecutionEngine/Orc/OrcTestCommon.h70
1 files changed, 35 insertions, 35 deletions
diff --git a/llvm/unittests/ExecutionEngine/Orc/OrcTestCommon.h b/llvm/unittests/ExecutionEngine/Orc/OrcTestCommon.h
index 99bae55815d..4be2e196707 100644
--- a/llvm/unittests/ExecutionEngine/Orc/OrcTestCommon.h
+++ b/llvm/unittests/ExecutionEngine/Orc/OrcTestCommon.h
@@ -25,41 +25,41 @@
namespace llvm {
- class ModuleBuilder {
- public:
- ModuleBuilder(LLVMContext &Context, StringRef Triple,
- StringRef Name);
-
- template <typename FuncType>
- Function* createFunctionDecl(Module *M, StringRef Name) {
- return Function::Create(
- TypeBuilder<FuncType, false>::get(M->getContext()),
- GlobalValue::ExternalLinkage, Name, M);
- }
-
- Module* getModule() { return M.get(); }
- const Module* getModule() const { return M.get(); }
- std::unique_ptr<Module> takeModule() { return std::move(M); }
-
- private:
- std::unique_ptr<Module> M;
- IRBuilder<> Builder;
- };
-
- // Dummy struct type.
- struct DummyStruct {
- int X[256];
- };
-
- // TypeBuilder specialization for DummyStruct.
- template <bool XCompile>
- class TypeBuilder<DummyStruct, XCompile> {
- public:
- static StructType *get(LLVMContext &Context) {
- return StructType::get(
- TypeBuilder<types::i<32>[256], XCompile>::get(Context), nullptr);
- }
- };
+class ModuleBuilder {
+public:
+ ModuleBuilder(LLVMContext &Context, StringRef Triple,
+ StringRef Name);
+
+ template <typename FuncType>
+ Function* createFunctionDecl(Module *M, StringRef Name) {
+ return Function::Create(
+ TypeBuilder<FuncType, false>::get(M->getContext()),
+ GlobalValue::ExternalLinkage, Name, M);
+ }
+
+ Module* getModule() { return M.get(); }
+ const Module* getModule() const { return M.get(); }
+ std::unique_ptr<Module> takeModule() { return std::move(M); }
+
+private:
+ std::unique_ptr<Module> M;
+ IRBuilder<> Builder;
+};
+
+// Dummy struct type.
+struct DummyStruct {
+ int X[256];
+};
+
+// TypeBuilder specialization for DummyStruct.
+template <bool XCompile>
+class TypeBuilder<DummyStruct, XCompile> {
+public:
+ static StructType *get(LLVMContext &Context) {
+ return StructType::get(
+ TypeBuilder<types::i<32>[256], XCompile>::get(Context), nullptr);
+ }
+};
template <typename HandleT,
typename AddModuleSetFtor,
OpenPOWER on IntegriCloud