LLVM  14.0.0git
WebAssemblyTargetInfo.cpp
Go to the documentation of this file.
1 //===-- WebAssemblyTargetInfo.cpp - WebAssembly Target Implementation -----===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 ///
9 /// \file
10 /// This file registers the WebAssembly target.
11 ///
12 //===----------------------------------------------------------------------===//
13 
15 #include "llvm/MC/TargetRegistry.h"
16 using namespace llvm;
17 
18 #define DEBUG_TYPE "wasm-target-info"
19 
21  static Target TheWebAssemblyTarget32;
22  return TheWebAssemblyTarget32;
23 }
25  static Target TheWebAssemblyTarget64;
26  return TheWebAssemblyTarget64;
27 }
28 
31  "WebAssembly 32-bit", "WebAssembly");
33  "WebAssembly 64-bit", "WebAssembly");
34 }
35 
36 // Defines llvm::WebAssembly::getWasm64Opcode llvm::WebAssembly::getStackOpcode
37 // which have to be in a shared location between CodeGen and MC.
38 #define GET_INSTRMAP_INFO 1
39 #define GET_INSTRINFO_ENUM 1
40 #include "WebAssemblyGenInstrInfo.inc"
llvm
This file implements support for optimizing divisions by a constant.
Definition: AllocatorList.h:23
llvm::getTheWebAssemblyTarget32
Target & getTheWebAssemblyTarget32()
Definition: WebAssemblyTargetInfo.cpp:20
llvm::Target
Target - Wrapper for Target specific information.
Definition: TargetRegistry.h:137
LLVMInitializeWebAssemblyTargetInfo
LLVM_EXTERNAL_VISIBILITY void LLVMInitializeWebAssemblyTargetInfo()
Definition: WebAssemblyTargetInfo.cpp:29
Y
static GCMetadataPrinterRegistry::Add< OcamlGCMetadataPrinter > Y("ocaml", "ocaml 3.10-compatible collector")
X
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang", "erlang-compatible garbage collector")
LLVM_EXTERNAL_VISIBILITY
#define LLVM_EXTERNAL_VISIBILITY
Definition: Compiler.h:132
WebAssemblyTargetInfo.h
llvm::getTheWebAssemblyTarget64
Target & getTheWebAssemblyTarget64()
Definition: WebAssemblyTargetInfo.cpp:24
llvm::RegisterTarget
RegisterTarget - Helper template for registering a target, for use in the target's initialization fun...
Definition: TargetRegistry.h:1057
TargetRegistry.h