[PATCH] D42987: [libc++abi] fix compilation in C++17 mode

2018-02-08 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. @rsmith. Sorry, you're right. I didn't notice that we already used `_LIBCPP_BUILDING_LIBRARY` in libc++abi. I wasn't sure if `_BUILDING_LIBRARY` changed the linkage or of any symbols, or changed their explicit instantiation. And, indeed, on Windows there's a problem with

[PATCH] D42987: [libc++abi] fix compilation in C++17 mode

2018-02-07 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL324542: Fix compilation in C++17 mode. (authored by rsmith, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D42987?vs=133089&id=133323#toc Rep

[PATCH] D42987: [libc++abi] fix compilation in C++17 mode

2018-02-07 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. I defined `_LIBCPP_BUILDING_LIBRARY` instead to match the existing code in libc++abi (stdlib_exception.cpp, stdlib_new_delete.cpp), which uses the `_BUILDING_LIBRARY` macro as a general way to say "give me all the symbols because I'm building the library". That seemed to

[PATCH] D42987: [libc++abi] fix compilation in C++17 mode

2018-02-07 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF accepted this revision. EricWF added a comment. This revision is now accepted and ready to land. I agree with Marshall. This should define `_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS` instead of `_LIBCPP_BUILDING_LIBRARY`. Other than that, this LGTM. Repository: rCXXA libc++abi

[PATCH] D42987: [libc++abi] fix compilation in C++17 mode

2018-02-06 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. I'm fine with this, though I wonder if using the more specific `_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS` might be a better thing to define. Repository: rCXXA libc++abi https://reviews.llvm.org/D42987 ___ c

[PATCH] D42987: [libc++abi] fix compilation in C++17 mode

2018-02-06 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith created this revision. rsmith added reviewers: EricWF, mclow.lists. Herald added a subscriber: sanjoy. C++17 removes `std::unexpected_handler`, but libc++abi needs it to define `__cxa_exception`. When building against libc++, this is easily rectified by telling libc++ we're building the l