Use -fno-math-errno by default, and remove the IsMathErrnoDefault
targethook, which is no longer being used. This fixes PR5971.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92987 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGen/libcalls.c b/test/CodeGen/libcalls.c
index fe12f4a..a96176a 100644
--- a/test/CodeGen/libcalls.c
+++ b/test/CodeGen/libcalls.c
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 -emit-llvm -o %t %s -triple i386-unknown-unknown
+// RUN: %clang_cc1 -fmath-errno -emit-llvm -o %t %s -triple i386-unknown-unknown
 // RUN: grep "declare " %t | count 6
 // RUN: grep "declare " %t | grep "@llvm." | count 1
-// RUN: %clang_cc1 -fno-math-errno -emit-llvm -o %t %s -triple i386-unknown-unknown
+// RUN: %clang_cc1 -emit-llvm -o %t %s -triple i386-unknown-unknown
 // RUN: grep "declare " %t | count 6
 // RUN: grep "declare " %t | grep -v "@llvm." | count 0
 
diff --git a/test/Driver/analyze.c b/test/Driver/analyze.c
index 2f850bc..359b0e0 100644
--- a/test/Driver/analyze.c
+++ b/test/Driver/analyze.c
@@ -6,4 +6,3 @@
 
 // CHECK: "-analyze"
 // CHECK: "-target-feature" "+sse"
-// CHECK: "-fno-math-errno"
diff --git a/test/Driver/clang_f_opts.c b/test/Driver/clang_f_opts.c
index c4ea430..f1d6759 100644
--- a/test/Driver/clang_f_opts.c
+++ b/test/Driver/clang_f_opts.c
@@ -1,11 +1,11 @@
-// RUN: %clang -### -S -fblocks -fbuiltin -fmath-errno -fcommon -fpascal-strings -fno-blocks -fno-builtin -fno-math-errno -fno-common -fno-pascal-strings -fblocks -fbuiltin -fmath-errno -fcommon -fpascal-strings %s 2>&1 | FileCheck -check-prefix=CHECK-OPTIONS1 %s
-// RUN: %clang -### -S -fblocks -fbuiltin -fmath-errno -fcommon -fpascal-strings -fno-blocks -fno-builtin -fno-math-errno -fno-common -fno-pascal-strings -fno-show-source-location -fshort-wchar %s 2>&1 | FileCheck -check-prefix=CHECK-OPTIONS2 %s
+// RUN: %clang -### -S -fblocks -fbuiltin -fno-math-errno -fcommon -fpascal-strings -fno-blocks -fno-builtin -fmath-errno -fno-common -fno-pascal-strings -fblocks -fbuiltin -fmath-errno -fcommon -fpascal-strings %s 2>&1 | FileCheck -check-prefix=CHECK-OPTIONS1 %s
+// RUN: %clang -### -S -fblocks -fbuiltin -fno-math-errno -fcommon -fpascal-strings -fno-blocks -fno-builtin -fmath-errno -fno-common -fno-pascal-strings -fno-show-source-location -fshort-wchar %s 2>&1 | FileCheck -check-prefix=CHECK-OPTIONS2 %s
 // RUN: %clang -### -fshort-enums %s 2>&1 | FileCheck -check-prefix=CHECK-SHORT-ENUMS %s
 
 // CHECK-OPTIONS1: -fblocks
 // CHECK-OPTIONS1: -fpascal-strings
 
-// CHECK-OPTIONS2: -fno-math-errno
+// CHECK-OPTIONS2: -fmath-errno
 // CHECK-OPTIONS2: -fno-builtin
 // CHECK-OPTIONS2: -fshort-wchar
 // CHECK-OPTIONS2: -fno-common
diff --git a/test/Sema/unused-expr.c b/test/Sema/unused-expr.c
index f5c64e6..68503bd 100644
--- a/test/Sema/unused-expr.c
+++ b/test/Sema/unused-expr.c
@@ -1,8 +1,8 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -fno-math-errno %s
+// RUN: %clang_cc1 -fsyntax-only -verify %s
 
 int foo(int X, int Y);
 
-double sqrt(double X);  // implicitly const because of -fno-math-errno!
+double sqrt(double X);  // implicitly const because of no -fmath-errno!
 
 void bar(volatile int *VP, int *P, int A,
          _Complex double C, volatile _Complex double VC) {
@@ -24,7 +24,7 @@
   __real__ C;          // expected-warning {{expression result unused}}
   __real__ VC;
   
-  // We know this can't change errno because of -fno-math-errno.
+  // We know this can't change errno because of no -fmath-errno.
   sqrt(A);  // expected-warning {{ignoring return value of function declared with const attribute}}
 }