This is an archive of the discontinued LLVM Phabricator instance.

MS ABI: Mangle null pointer-to-member-functions compatibly
ClosedPublic

Authored by majnemer on Jun 7 2014, 4:21 PM.

Details

Summary

Previously, we would mangle nullptr pointer-to-member-functions in class
templates with a mangling we invented because contemporary versions of
MSVC would crash when trying to compile such code.

However, VS "14" can successfully compile these sorts of template
instantiations. This commit updates our mangling to be compatible with
theirs.

Diff Detail

Repository
rL LLVM

Event Timeline

majnemer updated this revision to Diff 10213.Jun 7 2014, 4:21 PM
majnemer retitled this revision from to MS ABI: Mangle null pointer-to-member-functions compatibly.
majnemer updated this object.
majnemer added a reviewer: rnk.
majnemer added a subscriber: Unknown Object (MLST).
rnk accepted this revision.Jun 9 2014, 11:18 AM
rnk edited edge metadata.

lgtm

Feel free to commit with a test for the null data memptr of a non-dynamic class.

lib/AST/MicrosoftMangle.cpp
539 ↗(On Diff #10213)

What happens if -1 is the null representation? This happens for data memptrs of non-dynamic classes.

This revision is now accepted and ready to land.Jun 9 2014, 11:18 AM
majnemer closed this revision.Jun 10 2014, 10:03 PM
majnemer updated this revision to Diff 10314.

Closed by commit rL210637 (authored by @majnemer).