Page MenuHomePhabricator

Add Microsoft mangling for _Float16, similar to technique used for _Complex
ClosedPublic

Authored by mibintc on Apr 17 2018, 2:18 PM.

Details

Summary

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?

Diff Detail

Repository
rL LLVM

Event Timeline

mibintc created this revision.Apr 17 2018, 2:18 PM

FWIW, this demangles on both demangler.com and undname as "void cdecl Float16::f(struct clang::_Float16)", which seems like the right thing, since the "Complex" above demangles to: "void cdecl Complex::f(struct clang::_Complex<int>)"

I also note (since upon first reading) that the "Complex::" and "Float16::" in the demanglings are the namespaces, which are confusingly very similar to the actual names :)

This patch should be all that is required to get _Float16 to work on Windows.

This revision is now accepted and ready to land.Apr 17 2018, 2:31 PM
This revision was automatically updated to reflect the committed changes.