This is an archive of the discontinued LLVM Phabricator instance.

Let cxa_demangle.cpp compile with gcc/libstdc++ 4.8 and clang-cl/MSVC2013's STL.
ClosedPublic

Authored by thakis on Sep 15 2015, 6:48 PM.

Details

Reviewers
mclow.lists
Summary

I wanted a demangler that can demangle both Itanium-style and Microsoft-style mangled symbols, and that runs on all of Windows, Linux, and Mac OS X. I used libcxxabi's cxa_demangle for the Itanium demangling, but that required to get it to build with gcc on Linux and with clang-cl/MSVC on Windows. It required only small changes, and imho they look reasonable enough to send them upstream.

libstdc++ needs a few typedefs in malloc_alloc. MSVC's STL needs rebind(), construct(), destroy().

MSVC2013 also has no snprintf, but it allegedly exists in 2015. (I haven't tried building with 2015, though.)

Diff Detail

Event Timeline

thakis updated this revision to Diff 34863.Sep 15 2015, 6:48 PM
thakis retitled this revision from to Let cxa_demangle.cpp compile with gcc/libstdc++ 4.8 and clang-cl/MSVC2013's STL..
thakis updated this object.
thakis added a reviewer: mclow.lists.
thakis added a subscriber: cfe-commits.
mclow.lists accepted this revision.Sep 20 2015, 7:15 AM
mclow.lists edited edge metadata.

This looks good to me.

This revision is now accepted and ready to land.Sep 20 2015, 7:15 AM
thakis closed this revision.Sep 20 2015, 11:27 AM

r248129, thanks!