This is an archive of the discontinued LLVM Phabricator instance.

Clean up macros to detect underling C library functionality
AbandonedPublic

Authored by ldionne on Aug 14 2018, 2:43 PM.

Details

Reviewers
EricWF
dexonsmith
mclow.lists
Group Reviewers
Restricted Project
Summary

During the review of D50719, I said:

The presence/absence of C11 features in the underlying C library does not depend on what version of the C++ language we're compiling with.
The tests that use TEXT_HAS_C11_XXX should be updated to check TEST_STD_VER instead.

This does that.
The detection of C11 features happens no matter what the language level is.
The enabling/disabling of the C++ features is done based on the language level.

Diff Detail

Event Timeline

mclow.lists created this revision.Aug 14 2018, 2:43 PM
mclow.lists added inline comments.Aug 14 2018, 2:46 PM
include/__config
433

Should we be using __ISO_C_VISIBLE here, or __STDC_VERSION__?
I didn't change this, but ...

ldionne added inline comments.Aug 14 2018, 2:54 PM
include/__config
433

The weird part is that neither is defined when compiling C++ code..

ldionne added inline comments.Aug 14 2018, 3:15 PM
include/__config
433

This means that TEST_HAS_C11_FEATURES and _LIBCPP_HAS_C11_FEATURES will both be disabled all the time.

ldionne requested changes to this revision.Oct 24 2018, 8:22 AM

Marking as "request changes" to get off my review queue until the problem I pointed w.r.t. TEST_HAS_C11_FEATURES and _LIBCPP_HAS_C11_FEATURES always being undefined is resolved.

This revision now requires changes to proceed.Oct 24 2018, 8:22 AM
ldionne added a reviewer: Restricted Project.Nov 2 2020, 3:48 PM

Is this still relevant? We don't have _LIBCPP_HAS_C11_FEATURES anymore. If not relevant, let's close this to clear up the queue.

ldionne set the repository for this revision to rG LLVM Github Monorepo.Jan 11 2021, 3:00 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 11 2021, 3:00 PM
ldionne commandeered this revision.Jan 11 2021, 3:01 PM
ldionne edited reviewers, added: mclow.lists; removed: ldionne.

Commandeering to close as I don't think this applies anymore.

This revision now requires review to proceed.Jan 11 2021, 3:01 PM
ldionne abandoned this revision.Jan 11 2021, 3:01 PM