diff options
author | Dan Gohman <sunfish@mozilla.com> | 2014-03-04 12:54:43 -0800 |
---|---|---|
committer | Dan Gohman <sunfish@mozilla.com> | 2014-03-04 13:08:47 -0800 |
commit | dc1378e24ff461546f531ec3a6138046b8e9c9ef (patch) | |
tree | 11d7f7e71f144b0c2dfa90a2e1e88a9ae3a6b702 /lib/Target/JSBackend/JSTargetMachine.cpp | |
parent | 65405351ba0b32a8658c65940e0b65ceb2601ad4 (diff) |
Better integration with the LLVM Target system.
In particular, this is needed to make getOptLevel() work.
Diffstat (limited to 'lib/Target/JSBackend/JSTargetMachine.cpp')
-rw-r--r-- | lib/Target/JSBackend/JSTargetMachine.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/Target/JSBackend/JSTargetMachine.cpp b/lib/Target/JSBackend/JSTargetMachine.cpp new file mode 100644 index 0000000000..af428f2eb2 --- /dev/null +++ b/lib/Target/JSBackend/JSTargetMachine.cpp @@ -0,0 +1,14 @@ +#include "JSTargetMachine.h" +#include "llvm/Support/TargetRegistry.h" +#include "llvm/PassManager.h" +using namespace llvm; + +JSTargetMachine::JSTargetMachine(const Target &T, StringRef Triple, + StringRef CPU, StringRef FS, const TargetOptions &Options, + Reloc::Model RM, CodeModel::Model CM, + CodeGenOpt::Level OL) + : TargetMachine(T, Triple, CPU, FS, Options), + DL("e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-" + "f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128") { + CodeGenInfo = T.createMCCodeGenInfo(Triple, RM, CM, OL); +} |