13 #include "llvm/ADT/StringSwitch.h" 14 #include "llvm/Option/ArgList.h" 18 using namespace clang;
22 const llvm::Triple &Triple) {
23 if (Triple.getArch() == llvm::Triple::sparcv9) {
24 return llvm::StringSwitch<const char *>(Name)
25 .Case(
"niagara",
"-Av9b")
26 .Case(
"niagara2",
"-Av9b")
27 .Case(
"niagara3",
"-Av9d")
28 .Case(
"niagara4",
"-Av9d")
31 return llvm::StringSwitch<const char *>(Name)
33 .Case(
"supersparc",
"-Av8")
34 .Case(
"sparclite",
"-Asparclite")
35 .Case(
"f934",
"-Asparclite")
36 .Case(
"hypersparc",
"-Av8")
37 .Case(
"sparclite86x",
"-Asparclite")
38 .Case(
"sparclet",
"-Asparclet")
39 .Case(
"tsc701",
"-Asparclet")
40 .Case(
"v9",
"-Av8plus")
41 .Case(
"ultrasparc",
"-Av8plus")
42 .Case(
"ultrasparc3",
"-Av8plus")
43 .Case(
"niagara",
"-Av8plusb")
44 .Case(
"niagara2",
"-Av8plusb")
45 .Case(
"niagara3",
"-Av8plusd")
46 .Case(
"niagara4",
"-Av8plusd")
47 .Case(
"ma2100",
"-Aleon")
48 .Case(
"ma2150",
"-Aleon")
49 .Case(
"ma2155",
"-Aleon")
50 .Case(
"ma2450",
"-Aleon")
51 .Case(
"ma2455",
"-Aleon")
52 .Case(
"ma2x5x",
"-Aleon")
53 .Case(
"ma2080",
"-Aleon")
54 .Case(
"ma2085",
"-Aleon")
55 .Case(
"ma2480",
"-Aleon")
56 .Case(
"ma2485",
"-Aleon")
57 .Case(
"ma2x8x",
"-Aleon")
58 .Case(
"myriad2",
"-Aleon")
59 .Case(
"myriad2.1",
"-Aleon")
60 .Case(
"myriad2.2",
"-Aleon")
61 .Case(
"myriad2.3",
"-Aleon")
62 .Case(
"leon2",
"-Av8")
63 .Case(
"at697e",
"-Av8")
64 .Case(
"at697f",
"-Av8")
65 .Case(
"leon3",
"-Aleon")
66 .Case(
"ut699",
"-Av8")
67 .Case(
"gr712rc",
"-Aleon")
68 .Case(
"leon4",
"-Aleon")
69 .Case(
"gr740",
"-Aleon")
75 const ArgList &Args) {
77 if (Arg *A = Args.getLastArg(clang::driver::options::OPT_msoft_float,
78 options::OPT_mhard_float,
79 options::OPT_mfloat_abi_EQ)) {
80 if (A->getOption().matches(clang::driver::options::OPT_msoft_float))
82 else if (A->getOption().matches(options::OPT_mhard_float))
85 ABI = llvm::StringSwitch<sparc::FloatABI>(A->getValue())
90 !StringRef(A->getValue()).empty()) {
91 D.
Diag(clang::diag::err_drv_invalid_mfloat_abi) << A->getAsString(Args);
110 std::vector<StringRef> &Features) {
113 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.