[libcxx-commits] [PATCH] D108389: [libc++] Bypass calling exception-throwing functions in the dylib with -fno-exceptions

James Y Knight via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Aug 30 15:33:10 PDT 2021


jyknight added a comment.

> The only two classes that have this behavior are std::string and std::vector. All other classes define their exception-throwing functions in the headers, so they end up calling abort() directly. That looks accidental to me, and not really something we'd want to consider a contract with our users. WDYT?

Yes, I agree, that is a convincing argument.

I think I was getting mixed up in my mind with libstdc++'s behavior, which does put nearly all throws (historically, it may have been all) in the library. (Additionally, its errors are more useful, too, e.g. showing the actual out of range index, which makes that all the more valuable to emit in both modes).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108389/new/

https://reviews.llvm.org/D108389



More information about the libcxx-commits mailing list