clang 17.0.0git
SPIR.cpp
Go to the documentation of this file.
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
16using namespace clang;
17using namespace clang::targets;
18
20 MacroBuilder &Builder) const {
21 DefineStd(Builder, "SPIR", Opts);
22}
23
25 MacroBuilder &Builder) const {
27 DefineStd(Builder, "SPIR32", Opts);
28}
29
31 MacroBuilder &Builder) const {
33 DefineStd(Builder, "SPIR64", Opts);
34}
35
37 MacroBuilder &Builder) const {
38 DefineStd(Builder, "SPIRV", Opts);
39}
40
42 MacroBuilder &Builder) const {
44 DefineStd(Builder, "SPIRV32", Opts);
45}
46
48 MacroBuilder &Builder) const {
50 DefineStd(Builder, "SPIRV64", Opts);
51}
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Definition: LangOptions.h:82
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
===-— Other target property query methods -----------------------—===//
Definition: SPIR.cpp:24
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
===-— Other target property query methods -----------------------—===//
Definition: SPIR.cpp:30
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
===-— Other target property query methods -----------------------—===//
Definition: SPIR.cpp:19
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
===-— Other target property query methods -----------------------—===//
Definition: SPIR.cpp:41
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
===-— Other target property query methods -----------------------—===//
Definition: SPIR.cpp:47
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
===-— Other target property query methods -----------------------—===//
Definition: SPIR.cpp:36
void DefineStd(MacroBuilder &Builder, StringRef MacroName, const LangOptions &Opts)
DefineStd - Define a macro name and standard variants.
Definition: Targets.cpp:59