Index: lib/AST/MicrosoftMangle.cpp =================================================================== --- lib/AST/MicrosoftMangle.cpp +++ lib/AST/MicrosoftMangle.cpp @@ -1923,8 +1923,11 @@ mangleArtificalTagType(TTK_Struct, "_Float16", {"__clang"}); break; - case BuiltinType::Float128: - case BuiltinType::Half: { + case BuiltinType::Half: + mangleArtificalTagType(TTK_Struct, "_Half", {"__clang"}); + break; + + case BuiltinType::Float128: { DiagnosticsEngine &Diags = Context.getDiags(); unsigned DiagID = Diags.getCustomDiagID( DiagnosticsEngine::Error, "cannot mangle this built-in %0 type yet"); Index: test/CodeGenOpenCL/half.cl =================================================================== --- test/CodeGenOpenCL/half.cl +++ test/CodeGenOpenCL/half.cl @@ -1,4 +1,5 @@ // RUN: %clang_cc1 %s -emit-llvm -o - -triple spir-unknown-unknown | FileCheck %s +// RUN: %clang_cc1 %s -emit-llvm -o - -triple x86_64-pc-win32 | FileCheck %s #pragma OPENCL EXTENSION cl_khr_fp16 : enable