clang  14.0.0git
XCore.cpp
Go to the documentation of this file.
1 //===--- XCore.cpp - Implement XCore 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 XCore TargetInfo objects.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #include "XCore.h"
14 #include "clang/Basic/Builtins.h"
17 
18 using namespace clang;
19 using namespace clang::targets;
20 
21 const Builtin::Info XCoreTargetInfo::BuiltinInfo[] = {
22 #define BUILTIN(ID, TYPE, ATTRS) \
23  {#ID, TYPE, ATTRS, nullptr, ALL_LANGUAGES, nullptr},
24 #define LIBBUILTIN(ID, TYPE, ATTRS, HEADER) \
25  {#ID, TYPE, ATTRS, HEADER, ALL_LANGUAGES, nullptr},
26 #include "clang/Basic/BuiltinsXCore.def"
27 };
28 
30  MacroBuilder &Builder) const {
31  Builder.defineMacro("__xcore__");
32  Builder.defineMacro("__XS1B__");
33 }
34 
36  return llvm::makeArrayRef(BuiltinInfo, clang::XCore::LastTSBuiltin -
38 }
Builtins.h
MacroBuilder.h
clang::XCore::LastTSBuiltin
@ LastTSBuiltin
Definition: TargetBuiltins.h:310
XCore.h
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::Builtin::Info
Definition: Builtins.h:55
clang::Builtin::FirstTSBuiltin
@ FirstTSBuiltin
Definition: Builtins.h:52
clang::targets::XCoreTargetInfo::getTargetBuiltins
ArrayRef< Builtin::Info > getTargetBuiltins() const override
Return information about target-specific builtins for the current primary target, and info about whic...
Definition: XCore.cpp:35
clang::targets::XCoreTargetInfo::getTargetDefines
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
===-— Other target property query methods -----------------------—===//
Definition: XCore.cpp:29
clang::MacroBuilder
Definition: MacroBuilder.h:23