[libc++] Simplify a few macros in __config
authorLouis Dionne <ldionne.2@gmail.com>
Fri, 4 Jun 2021 17:31:22 +0000 (13:31 -0400)
committerLouis Dionne <ldionne.2@gmail.com>
Mon, 7 Jun 2021 16:45:59 +0000 (12:45 -0400)
commitfb4e4646188cf43a1e96a0aba6b6d24d8604257c
tree461d5ea5925dadabc057bb1a3e173c8922c13156
parent2c2feebcd1274425c853e3cff7cec6ba033c3ccd
[libc++] Simplify a few macros in __config

Several macros were guarded with a check along the lines of:

 #ifndef MACRO
 #  define MACRO ...
 #endif

However, some of these macros are never intended to be defined by users,
so it's pointless to make this check (i.e. the first #ifndef is always
true). This commit removes those checks.

The motivation for doing this cleanup is to remove the impression that
arbitrary configurations macros can be defined by users when including
libc++ headers, which doesn't work reliably and leads to macro spaghetti.
If one needs to be able to override a knob in the __config, that's fine,
but the proper way to do that is to document the macro as being a public
facing knob in the documentation, and most likely to migrate that macro
to __config_site (depending on the nature of the macro).

Differential Revision: https://reviews.llvm.org/D103705
libcxx/include/__config