clang 17.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"
17
18using namespace clang;
19using namespace clang::targets;
20
21static constexpr Builtin::Info BuiltinInfo[] = {
22#define BUILTIN(ID, TYPE, ATTRS) \
23 {#ID, TYPE, ATTRS, nullptr, HeaderDesc::NO_HEADER, ALL_LANGUAGES},
24#include "clang/Basic/BuiltinsVE.def"
25};
26
28 MacroBuilder &Builder) const {
29 Builder.defineMacro("_LP64", "1");
30 Builder.defineMacro("unix", "1");
31 Builder.defineMacro("__unix__", "1");
32 Builder.defineMacro("__linux__", "1");
33 Builder.defineMacro("__ve", "1");
34 Builder.defineMacro("__ve__", "1");
35 Builder.defineMacro("__STDC_HOSTED__", "1");
36 Builder.defineMacro("__STDC__", "1");
37 Builder.defineMacro("__NEC__", "1");
38 // FIXME: define __FAST_MATH__ 1 if -ffast-math is enabled
39 // FIXME: define __OPTIMIZE__ n if -On is enabled
40 // FIXME: define __VECTOR__ n 1 if automatic vectorization is enabled
41
42 Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1");
43 Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2");
44 Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4");
45 Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8");
46}
47
51}
static constexpr Builtin::Info BuiltinInfo[]
Definition: VE.cpp:21
static constexpr Builtin::Info BuiltinInfo[]
Definition: Builtins.cpp:32
Defines enum values for all the target-independent builtin functions.
Defines the clang::MacroBuilder utility class.
Enumerates target-specific builtins in their own namespaces within namespace clang.
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: VE.cpp:27
ArrayRef< Builtin::Info > getTargetBuiltins() const override
Return information about target-specific builtins for the current primary target, and info about whic...
Definition: VE.cpp:48