[PATCH] D46131: Add Microsoft Mangling for OpenCL Half Type
This revision was automatically updated to reflect the committed changes. Closed by commit rC331263: Add Microsoft Mangling for OpenCL Half Type (authored by erichkeane, committed by ). Repository: rC Clang https://reviews.llvm.org/D46131 Files: lib/AST/MicrosoftMangle.cpp test/CodeGenOpenCL/half.cl 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 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 = 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 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 = Context.getDiags(); unsigned DiagID = Diags.getCustomDiagID( DiagnosticsEngine::Error, "cannot mangle this built-in %0 type yet"); ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D46131: Add Microsoft Mangling for OpenCL Half Type
This revision was automatically updated to reflect the committed changes. Closed by commit rL331263: Add Microsoft Mangling for OpenCL Half Type (authored by erichkeane, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D46131?vs=144139=144712#toc Repository: rL LLVM https://reviews.llvm.org/D46131 Files: cfe/trunk/lib/AST/MicrosoftMangle.cpp cfe/trunk/test/CodeGenOpenCL/half.cl Index: cfe/trunk/test/CodeGenOpenCL/half.cl === --- cfe/trunk/test/CodeGenOpenCL/half.cl +++ cfe/trunk/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 Index: cfe/trunk/lib/AST/MicrosoftMangle.cpp === --- cfe/trunk/lib/AST/MicrosoftMangle.cpp +++ cfe/trunk/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 = Context.getDiags(); unsigned DiagID = Diags.getCustomDiagID( DiagnosticsEngine::Error, "cannot mangle this built-in %0 type yet"); Index: cfe/trunk/test/CodeGenOpenCL/half.cl === --- cfe/trunk/test/CodeGenOpenCL/half.cl +++ cfe/trunk/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 Index: cfe/trunk/lib/AST/MicrosoftMangle.cpp === --- cfe/trunk/lib/AST/MicrosoftMangle.cpp +++ cfe/trunk/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 = Context.getDiags(); unsigned DiagID = Diags.getCustomDiagID( DiagnosticsEngine::Error, "cannot mangle this built-in %0 type yet"); ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D46131: Add Microsoft Mangling for OpenCL Half Type
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm Repository: rC Clang https://reviews.llvm.org/D46131 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D46131: Add Microsoft Mangling for OpenCL Half Type
vbridgers created this revision. vbridgers added reviewers: rnk, Anastasia, erichkeane. vbridgers added a project: clang. Herald added subscribers: cfe-commits, yaxunl. Half-type mangling is accomplished following the method introduced by Erich Keane for mangling _Float16. Updated the half.cl LIT test to cover this particular case. Repository: rC Clang https://reviews.llvm.org/D46131 Files: lib/AST/MicrosoftMangle.cpp test/CodeGenOpenCL/half.cl 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 Index: lib/AST/MicrosoftMangle.cpp === --- lib/AST/MicrosoftMangle.cpp +++ lib/AST/MicrosoftMangle.cpp @@ -1922,8 +1922,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 = 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 Index: lib/AST/MicrosoftMangle.cpp === --- lib/AST/MicrosoftMangle.cpp +++ lib/AST/MicrosoftMangle.cpp @@ -1922,8 +1922,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 = Context.getDiags(); unsigned DiagID = Diags.getCustomDiagID( DiagnosticsEngine::Error, "cannot mangle this built-in %0 type yet"); ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits