r199907 - Allow clang to compile the "extern" storage class in OpenCL 1.2.

Pekka Jaaskelainen pekka.jaaskelainen at tut.fi
Thu Jan 23 08:36:10 PST 2014


Author: pjaaskel
Date: Thu Jan 23 10:36:09 2014
New Revision: 199907

URL: http://llvm.org/viewvc/llvm-project?rev=199907&view=rev
Log:
Allow clang to compile the "extern" storage class in OpenCL 1.2. 
The tests (forgot to svn add, sorry!).

Patch from Fraser Cormack!


Added:
    cfe/trunk/test/SemaOpenCL/extern.cl

Added: cfe/trunk/test/SemaOpenCL/extern.cl
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaOpenCL/extern.cl?rev=199907&view=auto
==============================================================================
--- cfe/trunk/test/SemaOpenCL/extern.cl (added)
+++ cfe/trunk/test/SemaOpenCL/extern.cl Thu Jan 23 10:36:09 2014
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 -x cl -cl-std=CL1.2 -emit-llvm %s -o - -verify | FileCheck %s
+// expected-no-diagnostics
+
+// CHECK: @foo = external global float
+extern constant float foo;
+
+kernel void test(global float* buf) {
+  buf[0] += foo;
+}





More information about the cfe-commits mailing list