OpenCL: introduce support for function scope __local variables

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140068 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGenOpenCL/local.cl b/test/CodeGenOpenCL/local.cl
new file mode 100644
index 0000000..32fa7be
--- /dev/null
+++ b/test/CodeGenOpenCL/local.cl
@@ -0,0 +1,7 @@
+// RUN: %clang_cc1 %s -ffake-address-space-map -emit-llvm -o - | FileCheck %s
+
+__kernel void foo(void) {
+  // CHECK: @foo.i = internal addrspace(2)
+  __local int i;
+  ++i;
+}