mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-19 18:26:28 +00:00
[Orc] Fix indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251423 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
76c9c0f915
commit
2d323d4ed2
@ -25,41 +25,41 @@
|
|||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
|
||||||
class ModuleBuilder {
|
class ModuleBuilder {
|
||||||
public:
|
public:
|
||||||
ModuleBuilder(LLVMContext &Context, StringRef Triple,
|
ModuleBuilder(LLVMContext &Context, StringRef Triple,
|
||||||
StringRef Name);
|
StringRef Name);
|
||||||
|
|
||||||
template <typename FuncType>
|
template <typename FuncType>
|
||||||
Function* createFunctionDecl(Module *M, StringRef Name) {
|
Function* createFunctionDecl(Module *M, StringRef Name) {
|
||||||
return Function::Create(
|
return Function::Create(
|
||||||
TypeBuilder<FuncType, false>::get(M->getContext()),
|
TypeBuilder<FuncType, false>::get(M->getContext()),
|
||||||
GlobalValue::ExternalLinkage, Name, M);
|
GlobalValue::ExternalLinkage, Name, M);
|
||||||
}
|
}
|
||||||
|
|
||||||
Module* getModule() { return M.get(); }
|
Module* getModule() { return M.get(); }
|
||||||
const Module* getModule() const { return M.get(); }
|
const Module* getModule() const { return M.get(); }
|
||||||
std::unique_ptr<Module> takeModule() { return std::move(M); }
|
std::unique_ptr<Module> takeModule() { return std::move(M); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<Module> M;
|
std::unique_ptr<Module> M;
|
||||||
IRBuilder<> Builder;
|
IRBuilder<> Builder;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Dummy struct type.
|
// Dummy struct type.
|
||||||
struct DummyStruct {
|
struct DummyStruct {
|
||||||
int X[256];
|
int X[256];
|
||||||
};
|
};
|
||||||
|
|
||||||
// TypeBuilder specialization for DummyStruct.
|
// TypeBuilder specialization for DummyStruct.
|
||||||
template <bool XCompile>
|
template <bool XCompile>
|
||||||
class TypeBuilder<DummyStruct, XCompile> {
|
class TypeBuilder<DummyStruct, XCompile> {
|
||||||
public:
|
public:
|
||||||
static StructType *get(LLVMContext &Context) {
|
static StructType *get(LLVMContext &Context) {
|
||||||
return StructType::get(
|
return StructType::get(
|
||||||
TypeBuilder<types::i<32>[256], XCompile>::get(Context), nullptr);
|
TypeBuilder<types::i<32>[256], XCompile>::get(Context), nullptr);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename HandleT,
|
template <typename HandleT,
|
||||||
typename AddModuleSetFtor,
|
typename AddModuleSetFtor,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user