[PATCH] OpenCL: Accept -cl-strict-aliasing

Matt Arsenault Matthew.Arsenault at amd.com
Sat Feb 14 13:57:41 PST 2015


This was in 1.0, but deprecated in 1.1. Accept it and do nothing for compatability.

http://reviews.llvm.org/D7647

Files:
  include/clang/Driver/CC1Options.td
  test/CodeGenOpenCL/cl-strict-aliasing.cl

Index: include/clang/Driver/CC1Options.td
===================================================================
--- include/clang/Driver/CC1Options.td
+++ include/clang/Driver/CC1Options.td
@@ -577,6 +577,8 @@
 
 def cl_opt_disable : Flag<["-"], "cl-opt-disable">,
   HelpText<"OpenCL only. This option disables all optimizations. The default is optimizations are enabled.">;
+def cl_strict_aliasing : Flag<["-"], "cl-strict-aliasing">,
+  HelpText<"OpenCL only. This option is for compatability with OpenCL 1.0">;
 def cl_single_precision_constant : Flag<["-"], "cl-single-precision-constant">,
   HelpText<"OpenCL only. Treat double precision floating-point constant as single precision constant.">;
 def cl_finite_math_only : Flag<["-"], "cl-finite-math-only">,
Index: test/CodeGenOpenCL/cl-strict-aliasing.cl
===================================================================
--- /dev/null
+++ test/CodeGenOpenCL/cl-strict-aliasing.cl
@@ -0,0 +1 @@
+// RUN: %clang_cc1 -x cl -emit-llvm -cl-strict-aliasing %s

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7647.19974.patch
Type: text/x-patch
Size: 1012 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150214/ed89d684/attachment.bin>


More information about the cfe-commits mailing list