Coverage Report

Created: 2019-07-24 05:18

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/lib/Target/WebAssembly/TargetInfo/WebAssemblyTargetInfo.cpp
Line
Count
Source
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
14
#include "TargetInfo/WebAssemblyTargetInfo.h"
15
#include "llvm/Support/TargetRegistry.h"
16
using namespace llvm;
17
18
#define DEBUG_TYPE "wasm-target-info"
19
20
577k
Target &llvm::getTheWebAssemblyTarget32() {
21
577k
  static Target TheWebAssemblyTarget32;
22
577k
  return TheWebAssemblyTarget32;
23
577k
}
24
577k
Target &llvm::getTheWebAssemblyTarget64() {
25
577k
  static Target TheWebAssemblyTarget64;
26
577k
  return TheWebAssemblyTarget64;
27
577k
}
28
29
157k
extern "C" void LLVMInitializeWebAssemblyTargetInfo() {
30
157k
  RegisterTarget<Triple::wasm32> X(getTheWebAssemblyTarget32(), "wasm32",
31
157k
                                   "WebAssembly 32-bit", "WebAssembly");
32
157k
  RegisterTarget<Triple::wasm64> Y(getTheWebAssemblyTarget64(), "wasm64",
33
157k
                                   "WebAssembly 64-bit", "WebAssembly");
34
157k
}