mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-28 06:00:28 +00:00
3869f2a5ab
Commit r267457 made a lot of type-substitutions threw off code formatting and alignment. This patch should tidy those changes up. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267475 91177308-0d34-0410-b5e6-96231b3b80d8
56 lines
1.4 KiB
C++
56 lines
1.4 KiB
C++
//===-------- OrcCBindingsStack.cpp - Orc JIT stack for C bindings --------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "OrcCBindingsStack.h"
|
|
|
|
#include "llvm/ExecutionEngine/Orc/OrcArchitectureSupport.h"
|
|
#include "llvm/Support/Debug.h"
|
|
#include "llvm/Support/DynamicLibrary.h"
|
|
#include <cstdio>
|
|
#include <system_error>
|
|
|
|
using namespace llvm;
|
|
|
|
std::unique_ptr<OrcCBindingsStack::CompileCallbackMgr>
|
|
OrcCBindingsStack::createCompileCallbackMgr(Triple T) {
|
|
switch (T.getArch()) {
|
|
default:
|
|
return nullptr;
|
|
|
|
case Triple::x86: {
|
|
typedef orc::LocalJITCompileCallbackManager<orc::OrcI386> CCMgrT;
|
|
return llvm::make_unique<CCMgrT>(0);
|
|
};
|
|
|
|
case Triple::x86_64: {
|
|
typedef orc::LocalJITCompileCallbackManager<orc::OrcX86_64> CCMgrT;
|
|
return llvm::make_unique<CCMgrT>(0);
|
|
}
|
|
}
|
|
}
|
|
|
|
OrcCBindingsStack::IndirectStubsManagerBuilder
|
|
OrcCBindingsStack::createIndirectStubsMgrBuilder(Triple T) {
|
|
switch (T.getArch()) {
|
|
default:
|
|
return nullptr;
|
|
|
|
case Triple::x86:
|
|
return []() {
|
|
return llvm::make_unique<orc::LocalIndirectStubsManager<orc::OrcI386>>();
|
|
};
|
|
|
|
case Triple::x86_64:
|
|
return []() {
|
|
return llvm::make_unique<
|
|
orc::LocalIndirectStubsManager<orc::OrcX86_64>>();
|
|
};
|
|
}
|
|
}
|