diff --git lib/Basic/TargetInfo.cpp lib/Basic/TargetInfo.cpp
index 3257526..c9d7747 100644
--- lib/Basic/TargetInfo.cpp
+++ lib/Basic/TargetInfo.cpp
@@ -186,6 +186,30 @@ void TargetInfo::setForcedLangOptions(LangOptions &Opts) {
     UseBitFieldTypeAlignment = false;
   if (Opts.ShortWChar)
     WCharType = UnsignedShort;
+
+  if (Opts.OpenCL) {
+    // Long is 64-bits by the OpenCL language standard, irrespective of what it normally
+    // is for the target. The other integer types are set up correctly for OpenCL by all
+    // targets currently.
+    LongWidth = 64; LongAlign = 64;
+    LargeArrayMinWidth = 128; LargeArrayAlign = 128;
+    LongLongWidth = 64; LongLongAlign = 64;
+
+    HalfWidth = 16; HalfAlign = 16;
+
+    FloatFormat = &llvm::APFloat::IEEEsingle;
+    DoubleFormat = &llvm::APFloat::IEEEdouble;
+    LongDoubleFormat = &llvm::APFloat::IEEEquad;
+    HalfFormat = &llvm::APFloat::IEEEhalf;
+
+    static const LangAS::Map OpenCLAddrSpaceMap = {
+      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..d5e908d
--- /dev/null
+++ test/Misc/languageOptsOpenCL.cl
@@ -0,0 +1,12 @@
+// 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(long) == 8) -1];
+int v1[(__alignof(long) == 8) -1];
+int v4[(sizeof(long long) == 8) -1];
+int v5[(__alignof(long long) == 8) -1];
+int v6[(sizeof(half) == 2) -1];
+int v7[(__alignof(half) == 2) -1];
