[PATCH] D50341: [libcxx] Fix XFAILs for aligned allocation tests on older OSX versions

Louis Dionne via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 14 12:26:56 PDT 2018


ldionne added a comment.

In https://reviews.llvm.org/D50341#1198863, @ldionne wrote:

> In https://reviews.llvm.org/D50341#1198339, @vsapsai wrote:
>
> > What about defining a feature for unsupported configurations? I've tried
> >
> >   if '__cpp_aligned_new' not in macros or \
> >           intMacroValue(macros['__cpp_aligned_new']) < 201606:
> >       self.config.available_features.add('libcpp-no-aligned-new')
> >   
> >
> > and `// UNSUPPORTED: libcpp-no-aligned-new`. Seems to be working but it's not sufficient. For example, clang-6 for old macOS versions would define `__cpp_aligned_new` but a test would fail. Still, we can use another feature, not necessarily macro-based. Though probably something like `libcpp-no-aligned-new` can replace `// UNSUPPORTED: c++98, c++03, c++11, c++14`.
>
>
> I thought about something like this, but it would only be useful in a couple of places, and I still don't understand why the tests are marked as unsupported on some compilers at all. Also, there's already a feature called `no-aligned-alloc`, which tests whether `-faligned-alloc` is supported, so we should avoid confusing both.


After discussing with Volodymyr, it's not clear exactly how we might create a `libcpp-no-aligned-new` check that properly expresses when aligned allocations are available or not. It also seems like there are no other lit features based on such a combination of compiler/target platform/standard/system_cxx_lib. I think we're better off just keeping the duplication of `UNSUPPORTED` cases right now, and we can revisit this idea in the future if we find ourselves needing that feature again.

Is there any blocking comment on this patch? I'd like to get it through to see if it fixes our testers (and Marshall's local testing, too).


Repository:
  rCXX libc++

https://reviews.llvm.org/D50341





More information about the cfe-commits mailing list