[all-commits] [llvm/llvm-project] ae5ed5: [libc++] Bypass calling exception-throwing functio...

Louis Dionne via All-commits all-commits at lists.llvm.org
Mon Aug 23 10:08:55 PDT 2021


  Branch: refs/heads/release/13.x
  Home:   https://github.com/llvm/llvm-project
  Commit: ae5ed5d23bb19d44024a6f5fe581906c8506f060
      https://github.com/llvm/llvm-project/commit/ae5ed5d23bb19d44024a6f5fe581906c8506f060
  Author: Louis Dionne <ldionne.2 at gmail.com>
  Date:   2021-08-23 (Mon, 23 Aug 2021)

  Changed paths:
    M libcxx/include/string
    M libcxx/include/vector

  Log Message:
  -----------
  [libc++] Bypass calling exception-throwing functions in the dylib with -fno-exceptions

basic_string and vector currently have a hard dependency on the compiled
library because they need to call __vector_base_common::__throw_xxx(),
which are externally instantiated in the compiled library. That makes
sense when exceptions are enabled (because we're trying to localize the
exception-throwing code to the compiled library), but it doesn't really
make sense when exceptions are disabled, and the __throw_xxx functions
are just calling abort() anyways.

This patch simply overrides the __throw_xxx() functions so that they
don't rely on the compiled library when exceptions are disabled.

Differential Revision: https://reviews.llvm.org/D108389

(cherry picked from commit f3bc0e51ab72f504445228cbb712542154ccb4cf)




More information about the All-commits mailing list