summaryrefslogtreecommitdiff
path: root/include/llvm/ExecutionEngine
diff options
context:
space:
mode:
authorDylan Noblesmith <nobled@dreamwidth.org>2011-05-06 22:05:43 +0000
committerDylan Noblesmith <nobled@dreamwidth.org>2011-05-06 22:05:43 +0000
commit71cbac6a834a6ab48598b57cf9e97d7b3da421ef (patch)
treeb39feadb7e7e0934041265685c6340b4b52d7160 /include/llvm/ExecutionEngine
parentbf4e10f2f69db24c107cb61d6fe10ed5b2047374 (diff)
downloadllvm-71cbac6a834a6ab48598b57cf9e97d7b3da421ef.tar.gz
llvm-71cbac6a834a6ab48598b57cf9e97d7b3da421ef.tar.bz2
llvm-71cbac6a834a6ab48598b57cf9e97d7b3da421ef.tar.xz
ExecutionEngine: fix JIT/MCJIT selectTarget() duplication
This prepares for making JITCtor/MCJITCtor take a TargetMachine* directly from clients like EngineBuilder. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131025 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ExecutionEngine')
-rw-r--r--include/llvm/ExecutionEngine/ExecutionEngine.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/llvm/ExecutionEngine/ExecutionEngine.h b/include/llvm/ExecutionEngine/ExecutionEngine.h
index a01ad3ae77..fdc2ad9bf7 100644
--- a/include/llvm/ExecutionEngine/ExecutionEngine.h
+++ b/include/llvm/ExecutionEngine/ExecutionEngine.h
@@ -210,6 +210,14 @@ public:
CodeModel::Model CMM =
CodeModel::Default);
+ /// selectTarget - Pick a target either via -march or by guessing the native
+ /// arch. Add any CPU features specified via -mcpu or -mattr.
+ static TargetMachine *selectTarget(Module *M,
+ StringRef MArch,
+ StringRef MCPU,
+ const SmallVectorImpl<std::string>& MAttrs,
+ std::string *Err);
+
/// addModule - Add a Module to the list of modules that we can JIT from.
/// Note that this takes ownership of the Module: when the ExecutionEngine is
/// destroyed, it destroys the Module as well.