llvm/lib/ExecutionEngine/Orc/OrcCBindingsStack.cpp
Lang Hames 3869f2a5ab [ORC] clang-format code that was touched in r267457. NFC.
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
2016-04-25 21:21:20 +00:00

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>>();
};
}
}