clang  9.0.0
Le64.cpp
Go to the documentation of this file.
1 //===--- Le64.cpp - Implement Le64 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 Le64 TargetInfo objects.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #include "Le64.h"
14 #include "Targets.h"
15 #include "clang/Basic/Builtins.h"
18 
19 using namespace clang;
20 using namespace clang::targets;
21 
22 const Builtin::Info Le64TargetInfo::BuiltinInfo[] = {
23 #define BUILTIN(ID, TYPE, ATTRS) \
24  {#ID, TYPE, ATTRS, nullptr, ALL_LANGUAGES, nullptr},
25 #include "clang/Basic/BuiltinsLe64.def"
26 };
27 
29  return llvm::makeArrayRef(BuiltinInfo, clang::Le64::LastTSBuiltin -
31 }
32 
34  MacroBuilder &Builder) const {
35  DefineStd(Builder, "unix", Opts);
36  defineCPUMacros(Builder, "le64", /*Tuning=*/false);
37  Builder.defineMacro("__ELF__");
38 }
void DefineStd(MacroBuilder &Builder, StringRef MacroName, const LangOptions &Opts)
DefineStd - Define a macro name and standard variants.
Definition: Targets.cpp:54
Defines the clang::MacroBuilder utility class.
ArrayRef< Builtin::Info > getTargetBuiltins() const override
Return information about target-specific builtins for the current primary target, and info about whic...
Definition: Le64.cpp:28
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
===-— Other target property query methods --------------------——===//
Definition: Le64.cpp:33
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Definition: LangOptions.h:49
Enumerates target-specific builtins in their own namespaces within namespace clang.
Dataflow Directional Tag Classes.
void defineCPUMacros(MacroBuilder &Builder, StringRef CPUName, bool Tuning)
Definition: Targets.cpp:70
void defineMacro(const Twine &Name, const Twine &Value="1")
Append a #define line for macro of the form "\#define Name Value\n".
Definition: MacroBuilder.h:29
Defines enum values for all the target-independent builtin functions.