[PATCH] D45738: Add Microsoft mangling for _Float16, similar to technique used for _Complex

Erich Keane via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 17 15:04:06 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL330225: Add Microsoft mangling for _Float16 (authored by erichkeane, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D45738?vs=142827&id=142846#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D45738

Files:
  cfe/trunk/lib/AST/MicrosoftMangle.cpp
  cfe/trunk/test/CodeGenCXX/mangle-ms.cpp


Index: cfe/trunk/test/CodeGenCXX/mangle-ms.cpp
===================================================================
--- cfe/trunk/test/CodeGenCXX/mangle-ms.cpp
+++ cfe/trunk/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: cfe/trunk/lib/AST/MicrosoftMangle.cpp
===================================================================
--- cfe/trunk/lib/AST/MicrosoftMangle.cpp
+++ cfe/trunk/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.142846.patch
Type: text/x-patch
Size: 953 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180417/6169a5e4/attachment.bin>


More information about the llvm-commits mailing list