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(
"leon2",
"-Av8")
49 .Case(
"at697e",
"-Av8")
50 .Case(
"at697f",
"-Av8")
51 .Case(
"leon3",
"-Av8")
52 .Case(
"ut699",
"-Av8")
53 .Case(
"gr712rc",
"-Av8")
54 .Case(
"leon4",
"-Av8")
55 .Case(
"gr740",
"-Av8")
61 const ArgList &Args) {
63 if (Arg *A = Args.getLastArg(clang::driver::options::OPT_msoft_float,
64 options::OPT_mhard_float,
65 options::OPT_mfloat_abi_EQ)) {
66 if (A->getOption().matches(clang::driver::options::OPT_msoft_float))
68 else if (A->getOption().matches(options::OPT_mhard_float))
71 ABI = llvm::StringSwitch<sparc::FloatABI>(A->getValue())
76 !StringRef(A->getValue()).empty()) {
77 D.
Diag(clang::diag::err_drv_invalid_mfloat_abi) << A->getAsString(Args);
96 std::vector<StringRef> &Features) {
99 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.