Coverage Report

Created: 2022-01-18 06:27

/Users/buildslave/jenkins/workspace/coverage/llvm-project/clang/lib/Basic/Targets/SPIR.cpp
Line
Count
Source
1
//===--- SPIR.cpp - Implement SPIR and SPIR-V target feature support ------===//
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
// This file implements SPIR and SPIR-V TargetInfo objects.
10
//
11
//===----------------------------------------------------------------------===//
12
13
#include "SPIR.h"
14
#include "Targets.h"
15
16
using namespace clang;
17
using namespace clang::targets;
18
19
void SPIRTargetInfo::getTargetDefines(const LangOptions &Opts,
20
282
                                      MacroBuilder &Builder) const {
21
282
  DefineStd(Builder, "SPIR", Opts);
22
282
}
23
24
void SPIR32TargetInfo::getTargetDefines(const LangOptions &Opts,
25
235
                                        MacroBuilder &Builder) const {
26
235
  SPIRTargetInfo::getTargetDefines(Opts, Builder);
27
235
  DefineStd(Builder, "SPIR32", Opts);
28
235
}
29
30
void SPIR64TargetInfo::getTargetDefines(const LangOptions &Opts,
31
47
                                        MacroBuilder &Builder) const {
32
47
  SPIRTargetInfo::getTargetDefines(Opts, Builder);
33
47
  DefineStd(Builder, "SPIR64", Opts);
34
47
}
35
36
void SPIRVTargetInfo::getTargetDefines(const LangOptions &Opts,
37
10
                                       MacroBuilder &Builder) const {
38
10
  DefineStd(Builder, "SPIRV", Opts);
39
10
}
40
41
void SPIRV32TargetInfo::getTargetDefines(const LangOptions &Opts,
42
4
                                         MacroBuilder &Builder) const {
43
4
  SPIRVTargetInfo::getTargetDefines(Opts, Builder);
44
4
  DefineStd(Builder, "SPIRV32", Opts);
45
4
}
46
47
void SPIRV64TargetInfo::getTargetDefines(const LangOptions &Opts,
48
6
                                         MacroBuilder &Builder) const {
49
6
  SPIRVTargetInfo::getTargetDefines(Opts, Builder);
50
6
  DefineStd(Builder, "SPIRV64", Opts);
51
6
}