diff --git lib/Basic/TargetInfo.cpp lib/Basic/TargetInfo.cpp
index 83d4e2b..e928a43 100644
--- lib/Basic/TargetInfo.cpp
+++ lib/Basic/TargetInfo.cpp
@@ -187,6 +187,34 @@ void TargetInfo::setForcedLangOptions(LangOptions &Opts) {
     UseBitFieldTypeAlignment = false;
   if (Opts.ShortWChar)
     WCharType = UnsignedShort;
+
+  if (Opts.OpenCL) {
+    // In general OpenCL specifies more than most C-style languages.
+    // sizeof() Int is 32-bits, Long is 64-bits, irrespective of what it normally
+    // is for the target. Types are specified to be aligned to their size.
+    // (Other integer types are not settable within clang codebase currently.)
+    IntWidth = 32; IntAlign = 32;
+    LongWidth = 64; LongAlign = 64;
+    LongLongWidth = 64; LongLongAlign = 64;
+
+    //OpenCL fully specifies the size, alignment and representation of floating types
+    FloatWidth = 32; FloatAlign = 32;
+    FloatFormat = &llvm::APFloat::IEEEsingle;
+    DoubleWidth = 64; DoubleAlign = 64;
+    DoubleFormat = &llvm::APFloat::IEEEdouble;
+    HalfWidth = 16; HalfAlign = 16;
+    HalfFormat = &llvm::APFloat::IEEEhalf;
+
+    //endian-specific spaces can be added by individual backends as desired 
+    static const LangAS::Map OpenCLAddrSpaceMap = {
+      0, // opencl_private
+      1, // opencl_global
+      2, // opencl_constant
+      3  // opencl_local
+    };
+
+    AddrSpaceMap = &OpenCLAddrSpaceMap;
+  }
 }
 
 //===----------------------------------------------------------------------===//
diff --git test/Misc/languageOptsOpenCL.cl test/Misc/languageOptsOpenCL.cl
new file mode 100644
index 0000000..5d514d3
--- /dev/null
+++ test/Misc/languageOptsOpenCL.cl
@@ -0,0 +1,25 @@
+// RUN: %clang_cc1 -triple armv7a-linux-gnueabi -x cl %s -verify
+// expected-no-diagnostics
+// since armv7 is 32-bit, this should test cl-specific sizes
+
+// Test the forced language options for OpenCL are set correctly.
+
+int v0[(sizeof(int) == 4) -1];
+int v1[(__alignof(int) == 4) -1];
+int v2[(sizeof(long) == 8) -1];
+int v3[(__alignof(long) == 8) -1];
+int v4[(sizeof(long long) == 8) -1];
+int v5[(__alignof(long long) == 8) -1];
+int v6[(sizeof(float) == 4) -1];
+int v7[(__alignof(float) == 4) -1];
+int v8[(sizeof(half) == 2) -1];
+int v9[(__alignof(half) == 2) -1];
+
+__global int p1;
+__local int p2;
+__constant int p3;
+__private int p4;
+
+#pragma OPENCL EXTENSION cl_khr_fp64 : enable
+int v10[(sizeof(double) == 8) -1];
+int v11[(__alignof(double) == 8) -1];
