[PATCH] D28785: Split exception.cpp and new.cpp implementation into different files for different runtimes

Shoaib Meenai via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 18 16:29:11 PST 2017


smeenai added a comment.

@EricWF and I discussed this on IRC a bunch yesterday.

We were inadvertently statically linking the Microsoft C++ libraries into tests, which is why `std::set_new_handler` was working with this patch. With that incorrect link removed, we get an undefined reference to `std::set_new_handler`, as expected. libc++ will have to implement `std::get_new_handler` and `std:set_new_handler` itself.

`vcruntime_new.h` is a gigantic pain, since it defines the operator new/delete overloads itself and is just generally annoying. We can avoid pulling it in ourselves, but user code might pull it in, and we probably want to be resilient to that? (I don't know how common the usage of that header is and if it's worth trying to be interoperable or just failing miserably in its presence.)


https://reviews.llvm.org/D28785





More information about the cfe-commits mailing list