-mcheck-zero-division.
llvm-svn: 186710
def mno_xgot : Flag<["-"], "mno-xgot">, Group<m_Group>;
def mldc1_sdc1 : Flag<["-"], "mldc1-sdc1">, Group<m_Group>;
def mno_ldc1_sdc1 : Flag<["-"], "mno-ldc1-sdc1">, Group<m_Group>;
+def mcheck_zero_division : Flag<["-"], "mcheck-zero-division">, Group<m_Group>;
+def mno_check_zero_division : Flag<["-"], "mno-check-zero-division">,
+ Group<m_Group>;
def mdsp : Flag<["-"], "mdsp">, Group<m_Group>;
def mno_dsp : Flag<["-"], "mno-dsp">, Group<m_Group>;
def mdspr2 : Flag<["-"], "mdspr2">, Group<m_Group>;
}
}
+ if (Arg *A = Args.getLastArg(options::OPT_mcheck_zero_division,
+ options::OPT_mno_check_zero_division)) {
+ if (A->getOption().matches(options::OPT_mno_check_zero_division)) {
+ CmdArgs.push_back("-mllvm");
+ CmdArgs.push_back("-mno-check-zero-division");
+ }
+ }
+
if (Arg *A = Args.getLastArg(options::OPT_G)) {
StringRef v = A->getValue();
CmdArgs.push_back("-mllvm");
// RUN: | FileCheck --check-prefix=CHECK-NOLDC1SDC1 %s
// CHECK-NOLDC1SDC1: "-mllvm" "-mno-ldc1-sdc1"
//
+// -mcheck-zero-division
+// RUN: %clang -target mips-linux-gnu -### -c %s \
+// RUN: -mno-check-zero-division -mcheck-zero-division 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-ZERODIV %s
+// CHECK-ZERODIV-NOT: "-mllvm" "-mno-check-zero-division"
+//
+// -mno-check-zero-division
+// RUN: %clang -target mips-linux-gnu -### -c %s \
+// RUN: -mcheck-zero-division -mno-check-zero-division 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-NOZERODIV %s
+// CHECK-NOZERODIV: "-mllvm" "-mno-check-zero-division"
+//
// -G
// RUN: %clang -target mips-linux-gnu -### -c %s \
// RUN: -G 16 2>&1 \