[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / lib / Basic / Targets / XCore.cpp
blobba64f15f3394aad3a12ab9b1086e14e2a35f8b60
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.
11 //===----------------------------------------------------------------------===//
13 #include "XCore.h"
14 #include "clang/Basic/Builtins.h"
15 #include "clang/Basic/MacroBuilder.h"
16 #include "clang/Basic/TargetBuiltins.h"
18 using namespace clang;
19 using namespace clang::targets;
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"
29 void XCoreTargetInfo::getTargetDefines(const LangOptions &Opts,
30 MacroBuilder &Builder) const {
31 Builder.defineMacro("__xcore__");
32 Builder.defineMacro("__XS1B__");
35 ArrayRef<Builtin::Info> XCoreTargetInfo::getTargetBuiltins() const {
36 return llvm::makeArrayRef(BuiltinInfo, clang::XCore::LastTSBuiltin -
37 Builtin::FirstTSBuiltin);