[WebAssembly] Initial WebAssembly backend
[oota-llvm.git] / lib / Target / WebAssembly / TargetInfo / WebAssemblyTargetInfo.cpp
1 //===-- WebAssemblyTargetInfo.cpp - WebAssembly Target Implementation -----===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 ///
10 /// \file
11 /// \brief This file registers the WebAssembly target.
12 ///
13 //===----------------------------------------------------------------------===//
14
15 #include "MCTargetDesc/WebAssemblyMCTargetDesc.h"
16 #include "llvm/ADT/Triple.h"
17 #include "llvm/Support/TargetRegistry.h"
18 using namespace llvm;
19
20 #define DEBUG_TYPE "wasm-target-info"
21
22 Target llvm::TheWebAssemblyTarget;
23
24 extern "C" void LLVMInitializeWebAssemblyTargetInfo() {
25   RegisterTarget<Triple::wasm32> X(TheWebAssemblyTarget, "wasm32",
26                                    "WebAssembly 32-bit");
27   RegisterTarget<Triple::wasm64> Y(TheWebAssemblyTarget, "wasm64",
28                                    "WebAssembly 64-bit");
29 }