Coverage Report

Created: 2019-07-24 05:18

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/clang/lib/Basic/Targets/XCore.cpp
Line
Count
Source
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"
15
#include "clang/Basic/MacroBuilder.h"
16
#include "clang/Basic/TargetBuiltins.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
29
void XCoreTargetInfo::getTargetDefines(const LangOptions &Opts,
30
11
                                       MacroBuilder &Builder) const {
31
11
  Builder.defineMacro("__XS1B__");
32
11
}
33
34
11
ArrayRef<Builtin::Info> XCoreTargetInfo::getTargetBuiltins() const {
35
11
  return llvm::makeArrayRef(BuiltinInfo, clang::XCore::LastTSBuiltin -
36
11
                                             Builtin::FirstTSBuiltin);
37
11
}