This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] [test] Fix the new_faligned_allocation.pass.cpp test for MSVC
ClosedPublic

Authored by mstorsjo on Aug 9 2021, 4:29 AM.

Details

Summary

Such environments do have aligned allocation functions these days, but
the RTTI type name test needs to be adjusted for the MSVC C++ ABI.

Diff Detail

Event Timeline

mstorsjo requested review of this revision.Aug 9 2021, 4:29 AM
mstorsjo created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptAug 9 2021, 4:29 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
ldionne accepted this revision.Aug 9 2021, 5:50 AM
This revision is now accepted and ready to land.Aug 9 2021, 5:50 AM
Quuxplusone added inline comments.
libcxx/test/libcxx/language.support/support.dynamic/new_faligned_allocation.pass.cpp
80

Shouldn't this use TEST_COMPILER_C1XX? Tests generally don't mess with implementation macros like _MSC_VER directly, but only through the test_macros.h helpers.

mstorsjo added inline comments.Aug 9 2021, 7:52 AM
libcxx/test/libcxx/language.support/support.dynamic/new_faligned_allocation.pass.cpp
80

This isn’t so much about the compiler itself, but the platform ABI. With clang-cl, you don’t get that macro defined, but only TEST_COMPILER_CLANG, while it obeys the Microsoft C++ ABI. I don’t see any existing defines there for that aspect.

Quuxplusone accepted this revision.Aug 9 2021, 8:20 AM
Quuxplusone added inline comments.
libcxx/test/libcxx/language.support/support.dynamic/new_faligned_allocation.pass.cpp
80

Well, I'm not interested in blocking this over that, so ship it, I guess. :)

This revision was landed with ongoing or failed builds.Aug 10 2021, 1:07 AM
This revision was automatically updated to reflect the committed changes.