clang  14.0.0git
MSP430.cpp
Go to the documentation of this file.
1 //===--- MSP430.cpp - Implement MSP430 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 MSP430 TargetInfo objects.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #include "MSP430.h"
15 
16 using namespace clang;
17 using namespace clang::targets;
18 
19 const char *const MSP430TargetInfo::GCCRegNames[] = {
20  "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
21  "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15"
22 };
23 
25  return llvm::makeArrayRef(GCCRegNames);
26 }
27 
29  MacroBuilder &Builder) const {
30  Builder.defineMacro("MSP430");
31  Builder.defineMacro("__MSP430__");
32  Builder.defineMacro("__ELF__");
33  // FIXME: defines for different 'flavours' of MCU
34 }
clang::targets::MSP430TargetInfo::getGCCRegNames
ArrayRef< const char * > getGCCRegNames() const override
Definition: MSP430.cpp:24
MacroBuilder.h
llvm::ArrayRef< const char * >
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
MSP430.h
clang::targets::MSP430TargetInfo::getTargetDefines
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
===-— Other target property query methods -----------------------—===//
Definition: MSP430.cpp:28
clang::MacroBuilder
Definition: MacroBuilder.h:23