clang  14.0.0git
SPIR.cpp
Go to the documentation of this file.
1 //===--- SPIR.cpp - Implement SPIR 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 TargetInfo objects.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #include "SPIR.h"
14 #include "Targets.h"
15 
16 using namespace clang;
17 using namespace clang::targets;
18 
20  MacroBuilder &Builder) const {
21  DefineStd(Builder, "SPIR", Opts);
22 }
23 
25  MacroBuilder &Builder) const {
26  SPIRTargetInfo::getTargetDefines(Opts, Builder);
27  DefineStd(Builder, "SPIR32", Opts);
28 }
29 
31  MacroBuilder &Builder) const {
32  SPIRTargetInfo::getTargetDefines(Opts, Builder);
33  DefineStd(Builder, "SPIR64", Opts);
34 }
SPIR.h
Targets.h
clang::targets::DefineStd
void DefineStd(MacroBuilder &Builder, StringRef MacroName, const LangOptions &Opts)
DefineStd - Define a macro name and standard variants.
Definition: Targets.cpp:56
clang::targets::SPIR64TargetInfo::getTargetDefines
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
===-— Other target property query methods -----------------------—===//
Definition: SPIR.cpp:30
clang::targets::SPIRTargetInfo::getTargetDefines
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
===-— Other target property query methods -----------------------—===//
Definition: SPIR.cpp:19
clang::LangOptions
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Definition: LangOptions.h:58
clang
Definition: CalledOnceCheck.h:17
clang::targets
Definition: AArch64.h:21
clang::MacroBuilder
Definition: MacroBuilder.h:23
clang::targets::SPIR32TargetInfo::getTargetDefines
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
===-— Other target property query methods -----------------------—===//
Definition: SPIR.cpp:24