[PATCH] D45738: Add Microsoft mangling for _Float16, similar to technique used for _Complex
Melanie Blower via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 17 14:18:58 PDT 2018
mibintc created this revision.
mibintc added reviewers: erichkeane, cfe-commits, majnemer.
Herald added a subscriber: llvm-commits.
Microsoft doesn't support _Float16, so this patch invents a mangling using the technique that was used for _Complex, putting _Float16 into __clang namespace. What do you think?
Repository:
rL LLVM
https://reviews.llvm.org/D45738
Files:
lib/AST/MicrosoftMangle.cpp
test/CodeGenCXX/mangle-ms.cpp
Index: test/CodeGenCXX/mangle-ms.cpp
===================================================================
--- test/CodeGenCXX/mangle-ms.cpp
+++ test/CodeGenCXX/mangle-ms.cpp
@@ -466,6 +466,10 @@
// CHECK-DAG: define dso_local void @"?f at Complex@@YAXU?$_Complex at H@__clang@@@Z"(
void f(_Complex int) {}
}
+namespace Float16 {
+// CHECK-DAG: define dso_local void @"?f at Float16@@YAXU_Float16 at __clang@@@Z"(
+void f(_Float16) {}
+}
namespace PR26029 {
template <class>
Index: lib/AST/MicrosoftMangle.cpp
===================================================================
--- lib/AST/MicrosoftMangle.cpp
+++ lib/AST/MicrosoftMangle.cpp
@@ -1919,6 +1919,9 @@
break;
case BuiltinType::Float16:
+ mangleArtificalTagType(TTK_Struct, "_Float16", {"__clang"});
+ break;
+
case BuiltinType::Float128:
case BuiltinType::Half: {
DiagnosticsEngine &Diags = Context.getDiags();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45738.142827.patch
Type: text/x-patch
Size: 893 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180417/8d521502/attachment.bin>
More information about the cfe-commits
mailing list