[libcxx-commits] [libcxxabi] d49c670 - [libcxxabi][demangle] Fix the cp-to-llvm.sh sync script to copy all headers (#166572)
via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Nov 5 09:48:51 PST 2025
Author: Michael Buch
Date: 2025-11-05T17:48:47Z
New Revision: d49c6707d07389e4bccdb23951dc9d3bc20996b1
URL: https://github.com/llvm/llvm-project/commit/d49c6707d07389e4bccdb23951dc9d3bc20996b1
DIFF: https://github.com/llvm/llvm-project/commit/d49c6707d07389e4bccdb23951dc9d3bc20996b1.diff
LOG: [libcxxabi][demangle] Fix the cp-to-llvm.sh sync script to copy all headers (#166572)
In https://github.com/llvm/llvm-project/pull/137947 I refactored the
script and added a `copy_files` function, which takes the header files
to copy as an argument.
But because the list of headers is a space separated string, we need to
quote the string. Otherwise we would just copy the first header in the
list.
This patch also adds an `echo` statement in the `copy_files` loop to
print the source/destination. Confirming that the files are copied as
expected.
```
$ libcxxabi/src/demangle/cp-to-llvm.sh
This will overwrite the copies of ItaniumDemangle.h ItaniumNodes.def StringViewExtras.h Utility.h in ../../../llvm/include/llvm/Demangle and DemangleTestCases.inc in ../../../llvm/include/llvm/Demangle/../Testing/Demangle; are you sure? [y/N]y
Copying ./ItaniumDemangle.h to ../../../llvm/include/llvm/Demangle/ItaniumDemangle.h
Copying ./ItaniumNodes.def to ../../../llvm/include/llvm/Demangle/ItaniumNodes.def
Copying ./StringViewExtras.h to ../../../llvm/include/llvm/Demangle/StringViewExtras.h
Copying ./Utility.h to ../../../llvm/include/llvm/Demangle/Utility.h
Copying ../../test/DemangleTestCases.inc to ../../../llvm/include/llvm/Demangle/../Testing/Demangle/DemangleTestCases.inc
```
Luckily there weren't any out-of-sync changes introduced in the
meantime.
Added:
Modified:
libcxxabi/src/demangle/cp-to-llvm.sh
Removed:
################################################################################
diff --git a/libcxxabi/src/demangle/cp-to-llvm.sh b/libcxxabi/src/demangle/cp-to-llvm.sh
index f773dff9f0a8b..9c1db6fec29a6 100755
--- a/libcxxabi/src/demangle/cp-to-llvm.sh
+++ b/libcxxabi/src/demangle/cp-to-llvm.sh
@@ -42,6 +42,7 @@ copy_files() {
chmod -w $dst/README.txt
for I in $hdrs ; do
+ echo "Copying ${src}/$I to ${dst}/$I"
rm -f $dst/$I
dash=$(echo "$I---------------------------" | cut -c -27 |\
sed 's|[^-]*||')
@@ -53,6 +54,6 @@ copy_files() {
}
if [[ $ANSWER =~ ^[Yy]$ ]]; then
- copy_files . $LLVM_DEMANGLE_DIR $HDRS
- copy_files ../../test $LLVM_TESTING_DIR $TEST_HDRS
+ copy_files . $LLVM_DEMANGLE_DIR "${HDRS}"
+ copy_files ../../test $LLVM_TESTING_DIR "${TEST_HDRS}"
fi
More information about the libcxx-commits
mailing list