]> granicus.if.org Git - clang/commitdiff
Remove the code that pulled soft float attributes out of the feature
authorEric Christopher <echristo@gmail.com>
Tue, 12 May 2015 01:26:21 +0000 (01:26 +0000)
committerEric Christopher <echristo@gmail.com>
Tue, 12 May 2015 01:26:21 +0000 (01:26 +0000)
strings and remove the setting of TargetOptions::UseSoftFloat to
match the code change in llvm r237079.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@237080 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Basic/Targets.cpp
lib/CodeGen/BackendUtil.cpp
test/CodeGen/function-target-features.c

index fe37caa83bd5b4c17b1eb71881f20d1599876f0d..55f7c8c9f6bbd3bcd459d4585c9daea556383f66 100644 (file)
@@ -4271,12 +4271,10 @@ public:
       Features.push_back("-neonfp");
 
     // Remove front-end specific options which the backend handles differently.
-    const StringRef FrontEndFeatures[] = { "+soft-float", "+soft-float-abi" };
-    for (const auto &FEFeature : FrontEndFeatures) {
-      auto Feature = std::find(Features.begin(), Features.end(), FEFeature);
-      if (Feature != Features.end())
-        Features.erase(Feature);
-    }
+    auto Feature =
+        std::find(Features.begin(), Features.end(), "+soft-float-abi");
+    if (Feature != Features.end())
+      Features.erase(Feature);
 
     return true;
   }
@@ -6149,12 +6147,6 @@ public:
         IsNan2008 = false;
     }
 
-    // Remove front-end specific options.
-    std::vector<std::string>::iterator it =
-      std::find(Features.begin(), Features.end(), "+soft-float");
-    if (it != Features.end())
-      Features.erase(it);
-
     setDescriptionString();
 
     return true;
index 20fd9af169d9b7fb2e0d3c34b50b440ecf6a3ba3..30030050df0d2a3402fb6f9da4f910a603e1b51c 100644 (file)
@@ -531,7 +531,6 @@ TargetMachine *EmitAssemblyHelper::CreateTargetMachine(bool MustCreateTM) {
   Options.NoNaNsFPMath = CodeGenOpts.NoNaNsFPMath;
   Options.NoZerosInBSS = CodeGenOpts.NoZeroInitializedInBSS;
   Options.UnsafeFPMath = CodeGenOpts.UnsafeFPMath;
-  Options.UseSoftFloat = CodeGenOpts.SoftFloat;
   Options.StackAlignmentOverride = CodeGenOpts.StackAlignment;
   Options.DisableTailCalls = CodeGenOpts.DisableTailCalls;
   Options.TrapFuncName = CodeGenOpts.TrapFuncName;
index b6cd4ca7a6d4205e7b35bf6bfe8ea8e30a5e812a..351c7f102b12b6e745262140257003bc9b25c7b8 100644 (file)
@@ -9,7 +9,7 @@
 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s -target-cpu corei7 -target-feature +avx | FileCheck %s -check-prefix=CORE-CPU-AND-FEATURES
 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s -target-cpu x86-64 | FileCheck %s -check-prefix=X86-64-CPU
 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s -target-cpu corei7-avx -target-feature -avx | FileCheck %s -check-prefix=AVX-MINUS-FEATURE
-// RUN: %clang_cc1 -triple sparc-unknown-unknown -emit-llvm -o - %s -target-feature +soft-float | FileCheck %s -check-prefix=SOFT-FLOAT
+// RUN: %clang_cc1 -triple sparc-unknown-unknown -emit-llvm -o - %s -target-feature +soft-float | FileCheck %s -check-prefix=NO-SOFT-FLOAT
 // RUN: %clang_cc1 -triple arm-unknown-unknown -emit-llvm -o - %s -target-feature +soft-float | FileCheck %s -check-prefix=SOFT-FLOAT
 // RUN: %clang_cc1 -triple mips-unknown-unknown -emit-llvm -o - %s -target-feature +soft-float | FileCheck %s -check-prefix=SOFT-FLOAT
 
@@ -22,4 +22,5 @@ void foo() {}
 // CORE-CPU-AND-FEATURES: "target-cpu"="corei7" "target-features"={{.*}}+avx
 // X86-64-CPU: "target-cpu"="x86-64"
 // AVX-MINUS-FEATURE: "target-features"={{.*}}-avx
-// SOFT-FLOAT-NOT: "target-features"={{.*}}+soft-float
+// SOFT-FLOAT: "target-features"={{.*}}+soft-float
+// NO-SOFT-FLOAT-NOT: "target-features"={{.*}}+soft-float