authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-08-04 17:52:26-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-08-04 17:52:26-07:00
log4269868d6a98a9b868827c2fc7e67d2f9b359647
treebcd3ea6e8ad6de9c0d4b6be10ea9254704870857
parent372062b4fe148c17a42ff0938781748ca1dc8328

update install files for LLVM 11rc1


5 files changed, 5 insertions(+), 86 deletions(-)

lib/libcxx/src/support/solaris/README deleted-4
...@@ -1,4 +0,0 @@
1This directory contains a partial implementation of the xlocale APIs for
2Solaris. Some portions are lifted from FreeBSD libc, and so are covered by a
32-clause BSD license instead of the MIT/UUIC license that the rest of libc++ is
4distributed under.
lib/libcxxabi/src/demangle/.clang-format deleted-2
...@@ -1,2 +0,0 @@
1BasedOnStyle: LLVM
2
lib/libcxxabi/src/demangle/README.txt deleted-52
...@@ -1,52 +0,0 @@
1Itanium Name Demangler Library
2==============================
3
4Introduction
5------------
6
7This directory contains the generic itanium name demangler library. The main
8purpose of the library is to demangle C++ symbols, i.e. convert the string
9"_Z1fv" into "f()". You can also use the CRTP base ManglingParser to perform
10some simple analysis on the mangled name, or (in LLVM) use the opaque
11ItaniumPartialDemangler to query the demangled AST.
12
13Why are there multiple copies of the this library in the source tree?
14---------------------------------------------------------------------
15
16This directory is mirrored between libcxxabi/demangle and
17llvm/include/llvm/Demangle. The simple reason for this is that both projects
18need to demangle symbols, but neither can depend on each other. libcxxabi needs
19the demangler to implement __cxa_demangle, which is part of the itanium ABI
20spec. LLVM needs a copy for a bunch of places, but doesn't want to use the
21system's __cxa_demangle because it a) might not be available (i.e., on Windows),
22and b) probably isn't that up-to-date on the latest language features.
23
24The copy of the demangler in LLVM has some extra stuff that aren't needed in
25libcxxabi (ie, the MSVC demangler, ItaniumPartialDemangler), which depend on the
26shared generic components. Despite these differences, we want to keep the "core"
27generic demangling library identical between both copies to simplify development
28and testing.
29
30If you're working on the generic library, then do the work first in libcxxabi,
31then run the cp-to-llvm.sh script in src/demangle. This script takes as an
32argument the path to llvm, and re-copies the changes you made to libcxxabi over.
33Note that this script just blindly overwrites all changes to the generic library
34in llvm, so be careful.
35
36Because the core demangler needs to work in libcxxabi, everything needs to be
37declared in an anonymous namespace (see DEMANGLE_NAMESPACE_BEGIN), and you can't
38introduce any code that depends on the libcxx dylib.
39
40Hopefully, when LLVM becomes a monorepo, we can de-duplicate this code, and have
41both LLVM and libcxxabi depend on a shared demangler library.
42
43Testing
44-------
45
46The tests are split up between libcxxabi/test/{unit,}test_demangle.cpp, and
47llvm/unittest/Demangle. The llvm directory should only get tests for stuff not
48included in the core library. In the future though, we should probably move all
49the tests to LLVM.
50
51It is also a really good idea to run libFuzzer after non-trivial changes, see
52libcxxabi/fuzz/cxa_demangle_fuzzer.cpp and https://llvm.org/docs/LibFuzzer.html.
lib/libcxxabi/src/demangle/cp-to-llvm.sh deleted-27
...@@ -1,27 +0,0 @@
1#!/bin/bash
2
3# Copies the 'demangle' library, excluding 'DemangleConfig.h', to llvm. If no
4# llvm directory is specified, then assume a monorepo layout.
5
6set -e
7
8FILES="ItaniumDemangle.h StringView.h Utility.h README.txt"
9LLVM_DEMANGLE_DIR=$1
10
11if [[ -z "$LLVM_DEMANGLE_DIR" ]]; then
12 LLVM_DEMANGLE_DIR="../../../llvm/include/llvm/Demangle"
13fi
14
15if [[ ! -d "$LLVM_DEMANGLE_DIR" ]]; then
16 echo "No such directory: $LLVM_DEMANGLE_DIR" >&2
17 exit 1
18fi
19
20read -p "This will overwrite the copies of $FILES in $LLVM_DEMANGLE_DIR; are you sure? [y/N]" -n 1 -r ANSWER
21echo
22
23if [[ $ANSWER =~ ^[Yy]$ ]]; then
24 for I in $FILES ; do
25 cp $I $LLVM_DEMANGLE_DIR/$I
26 done
27fi
src/install_files.h+5-1
...@@ -1853,18 +1853,20 @@ static const char *ZIG_LIBCXXABI_FILES[] = {...@@ -1853,18 +1853,20 @@ static const char *ZIG_LIBCXXABI_FILES[] = {
1853"src/cxa_noexception.cpp",1853"src/cxa_noexception.cpp",
1854"src/cxa_personality.cpp",1854"src/cxa_personality.cpp",
1855"src/cxa_thread_atexit.cpp",1855"src/cxa_thread_atexit.cpp",
1856"src/cxa_unexpected.cpp",
1857"src/cxa_vector.cpp",1856"src/cxa_vector.cpp",
1858"src/cxa_virtual.cpp",1857"src/cxa_virtual.cpp",
1859"src/fallback_malloc.cpp",1858"src/fallback_malloc.cpp",
1860"src/private_typeinfo.cpp",1859"src/private_typeinfo.cpp",
1861"src/stdlib_exception.cpp",1860"src/stdlib_exception.cpp",
1861"src/stdlib_new_delete.cpp",
1862"src/stdlib_stdexcept.cpp",1862"src/stdlib_stdexcept.cpp",
1863"src/stdlib_typeinfo.cpp",1863"src/stdlib_typeinfo.cpp",
1864};1864};
1865static const char *ZIG_LIBCXX_FILES[] = {1865static const char *ZIG_LIBCXX_FILES[] = {
1866"src/algorithm.cpp",1866"src/algorithm.cpp",
1867"src/any.cpp",1867"src/any.cpp",
1868"src/atomic.cpp",
1869"src/barrier.cpp",
1868"src/bind.cpp",1870"src/bind.cpp",
1869"src/charconv.cpp",1871"src/charconv.cpp",
1870"src/chrono.cpp",1872"src/chrono.cpp",
...@@ -1874,6 +1876,7 @@ static const char *ZIG_LIBCXX_FILES[] = {...@@ -1874,6 +1876,7 @@ static const char *ZIG_LIBCXX_FILES[] = {
1874"src/exception.cpp",1876"src/exception.cpp",
1875"src/experimental/memory_resource.cpp",1877"src/experimental/memory_resource.cpp",
1876"src/filesystem/directory_iterator.cpp",1878"src/filesystem/directory_iterator.cpp",
1879"src/filesystem/int128_builtins.cpp",
1877"src/filesystem/operations.cpp",1880"src/filesystem/operations.cpp",
1878"src/functional.cpp",1881"src/functional.cpp",
1879"src/future.cpp",1882"src/future.cpp",
...@@ -1887,6 +1890,7 @@ static const char *ZIG_LIBCXX_FILES[] = {...@@ -1887,6 +1890,7 @@ static const char *ZIG_LIBCXX_FILES[] = {
1887"src/new.cpp",1890"src/new.cpp",
1888"src/optional.cpp",1891"src/optional.cpp",
1889"src/random.cpp",1892"src/random.cpp",
1893"src/random_shuffle.cpp",
1890"src/regex.cpp",1894"src/regex.cpp",
1891"src/shared_mutex.cpp",1895"src/shared_mutex.cpp",
1892"src/stdexcept.cpp",1896"src/stdexcept.cpp",