blob: cacd10dc89368f66506a41a73ccb37d00d4f1540 [file] [log] [blame]
Erich Keaneebba5922017-07-21 22:37:03 +00001//===--- Le64.cpp - Implement Le64 target feature support -----------------===//
2//
Chandler Carruth2946cd72019-01-19 08:50:56 +00003// 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
Erich Keaneebba5922017-07-21 22:37:03 +00006//
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"
16#include "clang/Basic/MacroBuilder.h"
17#include "clang/Basic/TargetBuiltins.h"
18
19using namespace clang;
20using namespace clang::targets;
21
22const 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
28ArrayRef<Builtin::Info> Le64TargetInfo::getTargetBuiltins() const {
29 return llvm::makeArrayRef(BuiltinInfo, clang::Le64::LastTSBuiltin -
30 Builtin::FirstTSBuiltin);
31}
32
33void Le64TargetInfo::getTargetDefines(const LangOptions &Opts,
34 MacroBuilder &Builder) const {
35 DefineStd(Builder, "unix", Opts);
36 defineCPUMacros(Builder, "le64", /*Tuning=*/false);
37 Builder.defineMacro("__ELF__");
38}