clang  6.0.0svn
MSP430.cpp
Go to the documentation of this file.
1 //===--- MSP430.cpp - Implement MSP430 target feature support -------------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file implements MSP430 TargetInfo objects.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #include "MSP430.h"
16 
17 using namespace clang;
18 using namespace clang::targets;
19 
20 const char *const MSP430TargetInfo::GCCRegNames[] = {
21  "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
22  "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15"
23 };
24 
26  return llvm::makeArrayRef(GCCRegNames);
27 }
28 
30  MacroBuilder &Builder) const {
31  Builder.defineMacro("MSP430");
32  Builder.defineMacro("__MSP430__");
33  // FIXME: defines for different 'flavours' of MCU
34 }
Defines the clang::MacroBuilder utility class.
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Definition: LangOptions.h:48
ArrayRef< const char * > getGCCRegNames() const override
Definition: MSP430.cpp:25
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
===-— Other target property query methods --------------------——===//
Definition: MSP430.cpp:29
Dataflow Directional Tag Classes.
void defineMacro(const Twine &Name, const Twine &Value="1")
Append a #define line for macro of the form "\#define Name Value\n".
Definition: MacroBuilder.h:30