clang  14.0.0git
VE.cpp
Go to the documentation of this file.
1 //===--- VE.cpp - Implement VE 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 VE TargetInfo objects.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #include "VE.h"
14 #include "clang/Basic/Builtins.h"
17 
18 using namespace clang;
19 using namespace clang::targets;
20 
22  MacroBuilder &Builder) const {
23  Builder.defineMacro("_LP64", "1");
24  Builder.defineMacro("unix", "1");
25  Builder.defineMacro("__unix__", "1");
26  Builder.defineMacro("__linux__", "1");
27  Builder.defineMacro("__ve", "1");
28  Builder.defineMacro("__ve__", "1");
29  Builder.defineMacro("__STDC_HOSTED__", "1");
30  Builder.defineMacro("__STDC__", "1");
31  Builder.defineMacro("__NEC__", "1");
32  // FIXME: define __FAST_MATH__ 1 if -ffast-math is enabled
33  // FIXME: define __OPTIMIZE__ n if -On is enabled
34  // FIXME: define __VECTOR__ n 1 if automatic vectorization is enabled
35 }
36 
38  return ArrayRef<Builtin::Info>();
39 }
clang::targets::VETargetInfo::getTargetBuiltins
ArrayRef< Builtin::Info > getTargetBuiltins() const override
Return information about target-specific builtins for the current primary target, and info about whic...
Definition: VE.cpp:37
Builtins.h
VE.h
MacroBuilder.h
clang::targets::VETargetInfo::getTargetDefines
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
===-— Other target property query methods -----------------------—===//
Definition: VE.cpp:21
llvm::ArrayRef
Definition: LLVM.h:34
TargetBuiltins.h
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