[PATCH] D55685: Update Microsoft name mangling scheme for exception specifiers in the type system

Zachary Henkel via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 14 14:46:05 PST 2018


zahen added a comment.

In D55685#1330717 <https://reviews.llvm.org/D55685#1330717>, @zturner wrote:

> Also we still need to put this behind `-fms-compatibility-version`.  Finally, it would be nice if you could also update the demangler (`llvm/lib/Demangle/MicrosoftDemangle.cpp`)


This was introduced in 15.5 (1912).  What's the preferred way to represent that in clang code?



================
Comment at: lib/AST/MicrosoftMangle.cpp:2311-2314
+  if (FT->canThrow())
+    Out << 'Z';
+  else
+    Out << "_E";
----------------
zturner wrote:
> I knew that the mangling changed whenever a pointer to a `noexcept` function is passed as an argument, and we don't yet handle that, but I'm surprised to hear that they changed an existing mangling, since it's a hard ABI break.
> 
> Do you know the major and minor version numbers that this changed in?  I'd like to test it out for starters, but also since this is an ABI break we would need to put it behind `-fms-compatibility-version` and only mangle using the new scheme when the compatibility version is sufficiently high.
It's only when a function is used as a type.  My original rathole was trying to enumerate all of the places where that could be, but instead I settled on "everywhere but the initial definition".  It's why false is passed in the 4th parameter on line 516.

I've confirmed this changed in 15.5 so I'll use that as the compat version.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55685/new/

https://reviews.llvm.org/D55685





More information about the cfe-commits mailing list