14 #include "llvm/ADT/StringSwitch.h" 15 #include "llvm/Option/ArgList.h" 19 using namespace clang;
23 const llvm::Triple &Triple) {
24 if (Triple.getArch() == llvm::Triple::sparcv9) {
25 return llvm::StringSwitch<const char *>(Name)
26 .Case(
"niagara",
"-Av9b")
27 .Case(
"niagara2",
"-Av9b")
28 .Case(
"niagara3",
"-Av9d")
29 .Case(
"niagara4",
"-Av9d")
32 return llvm::StringSwitch<const char *>(Name)
34 .Case(
"supersparc",
"-Av8")
35 .Case(
"sparclite",
"-Asparclite")
36 .Case(
"f934",
"-Asparclite")
37 .Case(
"hypersparc",
"-Av8")
38 .Case(
"sparclite86x",
"-Asparclite")
39 .Case(
"sparclet",
"-Asparclet")
40 .Case(
"tsc701",
"-Asparclet")
41 .Case(
"v9",
"-Av8plus")
42 .Case(
"ultrasparc",
"-Av8plus")
43 .Case(
"ultrasparc3",
"-Av8plus")
44 .Case(
"niagara",
"-Av8plusb")
45 .Case(
"niagara2",
"-Av8plusb")
46 .Case(
"niagara3",
"-Av8plusd")
47 .Case(
"niagara4",
"-Av8plusd")
48 .Case(
"ma2100",
"-Aleon")
49 .Case(
"ma2150",
"-Aleon")
50 .Case(
"ma2155",
"-Aleon")
51 .Case(
"ma2450",
"-Aleon")
52 .Case(
"ma2455",
"-Aleon")
53 .Case(
"ma2x5x",
"-Aleon")
54 .Case(
"ma2080",
"-Aleon")
55 .Case(
"ma2085",
"-Aleon")
56 .Case(
"ma2480",
"-Aleon")
57 .Case(
"ma2485",
"-Aleon")
58 .Case(
"ma2x8x",
"-Aleon")
59 .Case(
"myriad2",
"-Aleon")
60 .Case(
"myriad2.1",
"-Aleon")
61 .Case(
"myriad2.2",
"-Aleon")
62 .Case(
"myriad2.3",
"-Aleon")
63 .Case(
"leon2",
"-Av8")
64 .Case(
"at697e",
"-Av8")
65 .Case(
"at697f",
"-Av8")
66 .Case(
"leon3",
"-Aleon")
67 .Case(
"ut699",
"-Av8")
68 .Case(
"gr712rc",
"-Aleon")
69 .Case(
"leon4",
"-Aleon")
70 .Case(
"gr740",
"-Aleon")
76 const ArgList &Args) {
78 if (Arg *A = Args.getLastArg(clang::driver::options::OPT_msoft_float,
79 options::OPT_mhard_float,
80 options::OPT_mfloat_abi_EQ)) {
81 if (A->getOption().matches(clang::driver::options::OPT_msoft_float))
83 else if (A->getOption().matches(options::OPT_mhard_float))
86 ABI = llvm::StringSwitch<sparc::FloatABI>(A->getValue())
91 !StringRef(A->getValue()).empty()) {
92 D.
Diag(clang::diag::err_drv_invalid_mfloat_abi) << A->getAsString(Args);
111 std::vector<StringRef> &Features) {
114 Features.push_back(
"+soft-float");
DiagnosticBuilder Diag(unsigned DiagID) const
Driver - Encapsulate logic for constructing compilation processes from a set of gcc-driver-like comma...
Dataflow Directional Tag Classes.