[libcxx-commits] [PATCH] D102372: [libcxxabi] Remove unnecessary define from build

Shoaib Meenai via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed May 12 14:49:46 PDT 2021


smeenai created this revision.
Herald added a subscriber: mgorny.
smeenai requested review of this revision.
Herald added a project: libc++abi.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++abi.

Now that we're passing -D_LIBCPP_BUILDING_LIBRARY to the libc++abi
build, -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS is redundant
(https://github.com/llvm/llvm-project/blob/fb3a00c327df78eaa534e53ac6f07112e0585121/libcxx/include/exception#L120-L121
is the only use of _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS in
libc++, and that conditional also checks for _LIBCPP_BUILDING_LIBRARY).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D102372

Files:
  libcxxabi/CMakeLists.txt


Index: libcxxabi/CMakeLists.txt
===================================================================
--- libcxxabi/CMakeLists.txt
+++ libcxxabi/CMakeLists.txt
@@ -477,10 +477,6 @@
 # Prevent libc++abi from having library dependencies on libc++
 add_definitions(-D_LIBCPP_DISABLE_EXTERN_TEMPLATE)
 
-# Bring back `std::unexpected`, which is removed in C++17, to support
-# pre-C++17.
-add_definitions(-D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS)
-
 if (MSVC)
   add_definitions(-D_CRT_SECURE_NO_WARNINGS)
 endif()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102372.344967.patch
Type: text/x-patch
Size: 520 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210512/64800c1c/attachment.bin>


More information about the libcxx-commits mailing list