[libc++][NFC] Remove _LIBCPP_FREESTANDING (#176907)
`_LIBCPP_FREESTANDING` isn't used and it is unclear what libc++'s strategy is going to be for implementing freestanding at the moment. Therefore, remove the macro.
This commit is contained in:
parent
12c13e0009
commit
ba0cddb43e
@ -38,10 +38,6 @@
|
||||
# define _LIBCPP_CONCAT(_X, _Y) _LIBCPP_CONCAT_IMPL(_X, _Y)
|
||||
# define _LIBCPP_CONCAT3(X, Y, Z) _LIBCPP_CONCAT(X, _LIBCPP_CONCAT(Y, Z))
|
||||
|
||||
# if __STDC_HOSTED__ == 0
|
||||
# define _LIBCPP_FREESTANDING
|
||||
# endif
|
||||
|
||||
# define _LIBCPP_TOSTRING2(x) #x
|
||||
# define _LIBCPP_TOSTRING(x) _LIBCPP_TOSTRING2(x)
|
||||
|
||||
|
||||
@ -32,10 +32,6 @@
|
||||
# define _LIBCPP_CONCAT_IMPL(_X, _Y) _X##_Y
|
||||
# define _LIBCPP_CONCAT(_X, _Y) _LIBCPP_CONCAT_IMPL(_X, _Y)
|
||||
|
||||
# if __STDC_HOSTED__ == 0
|
||||
# define _LIBCPP_FREESTANDING
|
||||
# endif
|
||||
|
||||
// HARDENING {
|
||||
|
||||
// This is for backward compatibility -- make enabling `_LIBCPP_ENABLE_ASSERTIONS` (which predates hardening modes)
|
||||
|
||||
@ -1,20 +0,0 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// Test that _LIBCPP_FREESTANDING is not defined when -ffreestanding is not passed
|
||||
// to the compiler but defined when -ffreestanding is passed to the compiler.
|
||||
|
||||
// RUN: %{cxx} %{flags} %{compile_flags} -fsyntax-only %s
|
||||
// RUN: %{cxx} %{flags} %{compile_flags} -fsyntax-only -ffreestanding -DFREESTANDING %s
|
||||
|
||||
#include <__config>
|
||||
|
||||
#if defined(FREESTANDING) != defined(_LIBCPP_FREESTANDING)
|
||||
#error _LIBCPP_FREESTANDING should be defined in freestanding mode and not \
|
||||
defined in non-freestanding mode
|
||||
#endif
|
||||
@ -1,20 +0,0 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// Test that _LIBCPP_FREESTANDING is not defined when -ffreestanding is not passed
|
||||
// to the compiler but defined when -ffreestanding is passed to the compiler.
|
||||
|
||||
// RUN: %{cxx} %{flags} %{compile_flags} -fsyntax-only %s
|
||||
// RUN: %{cxx} %{flags} %{compile_flags} -fsyntax-only -ffreestanding -DFREESTANDING %s
|
||||
|
||||
#include <__config>
|
||||
|
||||
#if defined(FREESTANDING) != defined(_LIBCPP_FREESTANDING)
|
||||
#error _LIBCPP_FREESTANDING should be defined in freestanding mode and not \
|
||||
defined in non-freestanding mode
|
||||
#endif
|
||||
Loading…
x
Reference in New Issue
Block a user