aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/JSBackend/MCTargetDesc/JSBackendMCTargetDesc.cpp
blob: f7ba0686839610c558525b5d74a36684708f483f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//===-- JSBackendMCTargetDesc.cpp - JS Backend Target Descriptions --------===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file provides asm.js specific target descriptions.
//
//===----------------------------------------------------------------------===//

#include "JSBackendMCTargetDesc.h"
#include "llvm/MC/MCCodeGenInfo.h"
#include "llvm/Support/TargetRegistry.h"
using namespace llvm;

static MCCodeGenInfo *createJSBackendMCCodeGenInfo(StringRef Triple, Reloc::Model RM,
                                                   CodeModel::Model CM,
                                                   CodeGenOpt::Level OL) {
  MCCodeGenInfo *X = new MCCodeGenInfo();
  X->InitMCCodeGenInfo(RM, CM, OL);
  return X;
}

// Force static initialization.
extern "C" void LLVMInitializeJSBackendTargetMC() {
  // Register the MC codegen info.
  RegisterMCCodeGenInfoFn C(TheJSBackendTarget, createJSBackendMCCodeGenInfo);
}