clang 8.0.0

Le64.cpp
Go to the documentation of this file.
1 //===--- Le64.cpp - Implement Le64 target feature support -----------------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file implements Le64 TargetInfo objects.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #include "Le64.h"
15 #include "Targets.h"
16 #include "clang/Basic/Builtins.h"
17 #include "clang/Basic/MacroBuilder.h"
18 #include "clang/Basic/TargetBuiltins.h"
19
20 using namespace clang;
21 using namespace clang::targets;
22
23 const Builtin::Info Le64TargetInfo::BuiltinInfo[] = {
24 #define BUILTIN(ID, TYPE, ATTRS) \
25 {#ID, TYPE, ATTRS, nullptr, ALL_LANGUAGES, nullptr},
26 #include "clang/Basic/BuiltinsLe64.def"
27 };
28
29 ArrayRef<Builtin::Info> Le64TargetInfo::getTargetBuiltins() const {
30 return llvm::makeArrayRef(BuiltinInfo, clang::Le64::LastTSBuiltin -
31 Builtin::FirstTSBuiltin);
32 }
33
34 void Le64TargetInfo::getTargetDefines(const LangOptions &Opts,
35 MacroBuilder &Builder) const {
36 DefineStd(Builder, "unix", Opts);
37 defineCPUMacros(Builder, "le64", /*Tuning=*/false);
38 Builder.defineMacro("__ELF__");
39 }
clang::targets::DefineStd
void DefineStd(MacroBuilder &Builder, StringRef MacroName, const LangOptions &Opts)
DefineStd - Define a macro name and standard variants.
Definition: Targets.cpp:55
MacroBuilder.h
Defines the clang::MacroBuilder utility class.
clang::targets
Definition: AArch64.h:22
clang::targets::Le64TargetInfo::getTargetBuiltins
ArrayRef< Builtin::Info > getTargetBuiltins() const override
Return information about target-specific builtins for the current primary target, and info about whic...
Definition: Le64.cpp:29
clang::Le64::LastTSBuiltin
Definition: TargetBuiltins.h:179
clang::targets::Le64TargetInfo::getTargetDefines
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
===-— Other target property query methods --------------------——===//
Definition: Le64.cpp:34
Le64.h
clang::Builtin::Info
Definition: Builtins.h:56
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:50
llvm::ArrayRef
Definition: LLVM.h:32
TargetBuiltins.h
Enumerates target-specific builtins in their own namespaces within namespace clang.
Targets.h
clang
Dataflow Directional Tag Classes.
Definition: CFGReachabilityAnalysis.h:22
clang::Builtin::FirstTSBuiltin
Definition: Builtins.h:53
clang::MacroBuilder
Definition: MacroBuilder.h:24
clang::targets::defineCPUMacros
void defineCPUMacros(MacroBuilder &Builder, StringRef CPUName, bool Tuning)
Definition: Targets.cpp:71
clang::MacroBuilder::defineMacro
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:30
Builtins.h
Defines enum values for all the target-independent builtin functions.