diff options
Diffstat (limited to 'lib/Target/JSBackend/MCTargetDesc/JSBackendMCTargetDesc.cpp')
-rw-r--r-- | lib/Target/JSBackend/MCTargetDesc/JSBackendMCTargetDesc.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/lib/Target/JSBackend/MCTargetDesc/JSBackendMCTargetDesc.cpp b/lib/Target/JSBackend/MCTargetDesc/JSBackendMCTargetDesc.cpp new file mode 100644 index 0000000000..f7ba068683 --- /dev/null +++ b/lib/Target/JSBackend/MCTargetDesc/JSBackendMCTargetDesc.cpp @@ -0,0 +1,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); +} |