This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Use a different namespace for the debug-mode version of the library
AbandonedPublic

Authored by ldionne on Jun 8 2022, 3:33 PM.

Details

Reviewers
None
Group Reviewers
Restricted Project
Summary

This ensures that one can't easily mix the debug version of the library
and the non-debug version of the library by mistake.

Diff Detail

Event Timeline

ldionne created this revision.Jun 8 2022, 3:33 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 8 2022, 3:33 PM
Herald added a subscriber: mgorny. · View Herald Transcript
ldionne requested review of this revision.Jun 8 2022, 3:33 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 8 2022, 3:33 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
philnik added a subscriber: philnik.Jun 8 2022, 3:41 PM
philnik added inline comments.
libcxx/CMakeLists.txt
191

I think versioning the debug namespace in the same way we version the non-debug namespace isn't a good idea. It gives the impression that the ABI for the debug mode is stable. I would suggest just using __libcxx_debug_ns as the namespace or use the libc++ version in the mangling to catch these kinds of mismatches as well. Maybe __libcxx_debug_<version>?

Mordante added inline comments.
libcxx/CMakeLists.txt
191

But I assume we can still use ABI v1 and ABI v2 with debug mode. In which case this needs to remain.

ldionne abandoned this revision.Nov 5 2023, 5:01 PM

Abandoning since the legacy debug mode doesn't exist anymore.