15#include "llvm/ADT/StringSwitch.h"
20const char *
const LanaiTargetInfo::GCCRegNames[] = {
21 "r0",
"r1",
"r2",
"r3",
"r4",
"r5",
"r6",
"r7",
"r8",
"r9",
"r10",
22 "r11",
"r12",
"r13",
"r14",
"r15",
"r16",
"r17",
"r18",
"r19",
"r20",
"r21",
23 "r22",
"r23",
"r24",
"r25",
"r26",
"r27",
"r28",
"r29",
"r30",
"r31"
31 {{
"pc"},
"r2"}, {{
"sp"},
"r4"}, {{
"fp"},
"r5"}, {{
"rv"},
"r8"},
32 {{
"rr1"},
"r10"}, {{
"rr2"},
"r11"}, {{
"rca"},
"r15"},
40 return llvm::StringSwitch<bool>(Name).Case(
"v11",
true).Default(
false);
44 Values.emplace_back(
"v11");
48 CPU = llvm::StringSwitch<CPUKind>(Name).Case(
"v11", CK_V11).Default(CK_NONE);
50 return CPU != CK_NONE;
54 return llvm::StringSwitch<bool>(Feature).Case(
"lanai",
true).Default(
false);
60 Builder.defineMacro(
"__lanai__");
65 Builder.defineMacro(
"__LANAI_V11__");
68 llvm_unreachable(
"Unhandled target CPU");
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...
ArrayRef< TargetInfo::GCCRegAlias > getGCCRegAliases() const override
ArrayRef< const char * > getGCCRegNames() const override
void fillValidCPUList(SmallVectorImpl< StringRef > &Values) const override
Fill a SmallVectorImpl with the valid values to setCPU.
bool hasFeature(StringRef Feature) const override
Determine whether the given target has the given feature.
bool setCPU(const std::string &Name) override
Target the specified CPU.
bool isValidCPUName(StringRef Name) const override
Determine whether this TargetInfo supports the given CPU name.
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
===-— Other target property query methods -----------------------—===//
The JSON file list parser is used to communicate input to InstallAPI.