aboutsummaryrefslogtreecommitdiff
path: root/libcxxabi
diff options
context:
space:
mode:
authorNick Desaulniers <ndesaulniers@google.com>2023-05-25 14:22:47 -0700
committerNick Desaulniers <ndesaulniers@google.com>2023-05-25 14:22:50 -0700
commitbad1a6943257d59a94f265d0c5efa859b2b3597a (patch)
tree0f8f8d2ac1482f07541f7a781c2b4824a23bd2ff /libcxxabi
parentf039caec338300b794f0edf0ef10df49b297ec37 (diff)
downloadllvm-bad1a6943257d59a94f265d0c5efa859b2b3597a.zip
llvm-bad1a6943257d59a94f265d0c5efa859b2b3597a.tar.gz
llvm-bad1a6943257d59a94f265d0c5efa859b2b3597a.tar.bz2
[libcxxabi] link abort_message into unittest_demangle
unittest_demangle.pass.cpp uses the preprocessor to #include cxa_demangle.cpp. D148566 will make more use of std::string_view in libcxxabi rather than the home-grown StringView, but as a result of D149092, a definition of abort_message needs to be provided. Otherwise builds of check-cxxabi with -DLLVM_ENABLE_ASSERTIONS=ON will fail to link with the errors: /usr/bin/ld: /tmp/lit-tmp-0akcq37p/cc6DLdvw.o: in function `(anonymous namespace)::itanium_demangle::starts_with(std::__1::basic_string_view<char, std::__1::char_traits<char> >, char)': unittest_demangle.pass.cpp:(.text+0x81): undefined reference to `abort_message' /usr/bin/ld: /tmp/lit-tmp-0akcq37p/cc6DLdvw.o: in function `(anonymous namespace)::itanium_demangle::starts_with(std::__1::basic_string_view<char, std::__1::char_traits<char> >, std::__1::basic_string_view<char, std::__1::char_traits<char> >)': unittest_demangle.pass.cpp:(.text+0x2aa): undefined reference to `abort_message' /usr/bin/ld: unittest_demangle.pass.cpp:(.text+0x312): undefined reference to `abort_message' /usr/bin/ld: /tmp/lit-tmp-0akcq37p/cc6DLdvw.o: in function `(anonymous namespace)::itanium_demangle::OutputBuffer::writeUnsigned(unsigned long, bool)': unittest_demangle.pass.cpp:(.text+0x54f): undefined reference to `abort_message' /usr/bin/ld: unittest_demangle.pass.cpp:(.text+0x5b7): undefined reference to `abort_message' /usr/bin/ld: /tmp/lit-tmp-0akcq37p/cc6DLdvw.o:unittest_demangle.pass.cpp:(.text+0xe6e): more undefined references to `abort_message' follow /usr/bin/ld: /home/libcxx-builder/.buildkite-agent/builds/google-libcxx-builder-f0560ea595b1-1/llvm-project/libcxx-ci/build/generic-gcc/test/Output/unittest_demangle.pass.cpp.dir/t.tmp.exe: hidden symbol `abort_message' isn't defined Use the preprocessor further to provide the definition of abort_message for this unittest. Reviewed By: #libc_abi, phosek Differential Revision: https://reviews.llvm.org/D151160
Diffstat (limited to 'libcxxabi')
-rw-r--r--libcxxabi/test/unittest_demangle.pass.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/libcxxabi/test/unittest_demangle.pass.cpp b/libcxxabi/test/unittest_demangle.pass.cpp
index fa2853a..07aced2 100644
--- a/libcxxabi/test/unittest_demangle.pass.cpp
+++ b/libcxxabi/test/unittest_demangle.pass.cpp
@@ -9,6 +9,7 @@
// UNSUPPORTED: c++03
#include "../src/cxa_demangle.cpp"
+#include "../src/abort_message.cpp"
using namespace __cxxabiv1;