blob: ddb1eb1d18920ae85182dcc6174e42a540bb44ea [file] [log] [blame]
Dan Gohman10e730a2015-06-29 23:51:55 +00001//===-- 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"
18using namespace llvm;
19
20#define DEBUG_TYPE "wasm-target-info"
21
Dan Gohmand82494b2015-07-01 21:42:34 +000022Target llvm::TheWebAssemblyTarget32;
23Target llvm::TheWebAssemblyTarget64;
Dan Gohman10e730a2015-06-29 23:51:55 +000024
25extern "C" void LLVMInitializeWebAssemblyTargetInfo() {
Dan Gohmand82494b2015-07-01 21:42:34 +000026 RegisterTarget<Triple::wasm32> X(TheWebAssemblyTarget32, "wasm32",
Dan Gohman10e730a2015-06-29 23:51:55 +000027 "WebAssembly 32-bit");
Dan Gohmand82494b2015-07-01 21:42:34 +000028 RegisterTarget<Triple::wasm64> Y(TheWebAssemblyTarget64, "wasm64",
Dan Gohman10e730a2015-06-29 23:51:55 +000029 "WebAssembly 64-bit");
30}