[PATCH] D12155: ARM: Error out on apple darwin platforms if float-abi is "hard"

Akira Hatanaka via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 24 13:05:43 PDT 2015


This revision was automatically updated to reflect the committed changes.
Closed by commit rL245866: [ARM] Error out on apple darwin platforms if float-abi is "hard". (authored by ahatanak).

Changed prior to commit:
  http://reviews.llvm.org/D12155?vs=32561&id=32989#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D12155

Files:
  cfe/trunk/lib/Driver/Tools.cpp
  cfe/trunk/test/Driver/arm-float-abi.c

Index: cfe/trunk/test/Driver/arm-float-abi.c
===================================================================
--- cfe/trunk/test/Driver/arm-float-abi.c
+++ cfe/trunk/test/Driver/arm-float-abi.c
@@ -0,0 +1,5 @@
+// RUN: not %clang %s -target armv7-apple-ios -mfloat-abi=hard 2>&1 | FileCheck -check-prefix=ARMV7-HARD %s
+// RUN: %clang %s -target armv7-apple-ios -mfloat-abi=softfp -### 2>&1 | FileCheck -check-prefix=ARMV7-SOFTFP %s
+
+// ARMV7-HARD: unsupported option '-mfloat-abi=hard' for target 'thumbv7'
+// ARMV7-SOFTFP-NOT: unsupported option
Index: cfe/trunk/lib/Driver/Tools.cpp
===================================================================
--- cfe/trunk/lib/Driver/Tools.cpp
+++ cfe/trunk/lib/Driver/Tools.cpp
@@ -582,6 +582,10 @@
         FloatABI = "soft";
       }
     }
+
+    if (Triple.isOSDarwin() && FloatABI == "hard")
+      D.Diag(diag::err_drv_unsupported_opt_for_target) << A->getAsString(Args)
+                                                       << Triple.getArchName();
   }
 
   // If unspecified, choose the default based on the platform.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12155.32989.patch
Type: text/x-patch
Size: 1081 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150824/56bb1790/attachment.bin>


More information about the cfe-commits mailing list