1 //===--- SPIR.cpp - Implement SPIR and SPIR-V target feature support ------===//
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
7 //===----------------------------------------------------------------------===//
9 // This file implements SPIR and SPIR-V TargetInfo objects.
11 //===----------------------------------------------------------------------===//
16 using namespace clang
;
17 using namespace clang::targets
;
19 void SPIRTargetInfo::getTargetDefines(const LangOptions
&Opts
,
20 MacroBuilder
&Builder
) const {
21 DefineStd(Builder
, "SPIR", Opts
);
24 void SPIR32TargetInfo::getTargetDefines(const LangOptions
&Opts
,
25 MacroBuilder
&Builder
) const {
26 SPIRTargetInfo::getTargetDefines(Opts
, Builder
);
27 DefineStd(Builder
, "SPIR32", Opts
);
30 void SPIR64TargetInfo::getTargetDefines(const LangOptions
&Opts
,
31 MacroBuilder
&Builder
) const {
32 SPIRTargetInfo::getTargetDefines(Opts
, Builder
);
33 DefineStd(Builder
, "SPIR64", Opts
);
36 void SPIRVTargetInfo::getTargetDefines(const LangOptions
&Opts
,
37 MacroBuilder
&Builder
) const {
38 DefineStd(Builder
, "SPIRV", Opts
);
41 void SPIRV32TargetInfo::getTargetDefines(const LangOptions
&Opts
,
42 MacroBuilder
&Builder
) const {
43 SPIRVTargetInfo::getTargetDefines(Opts
, Builder
);
44 DefineStd(Builder
, "SPIRV32", Opts
);
47 void SPIRV64TargetInfo::getTargetDefines(const LangOptions
&Opts
,
48 MacroBuilder
&Builder
) const {
49 SPIRVTargetInfo::getTargetDefines(Opts
, Builder
);
50 DefineStd(Builder
, "SPIRV64", Opts
);