Index: libcxxabi/src/demangle/cp-to-llvm.sh =================================================================== --- libcxxabi/src/demangle/cp-to-llvm.sh +++ libcxxabi/src/demangle/cp-to-llvm.sh @@ -5,7 +5,8 @@ set -e -FILES="ItaniumDemangle.h StringView.h Utility.h README.txt" +cd $(dirname $0) +HDRS="ItaniumDemangle.h StringView.h Utility.h" LLVM_DEMANGLE_DIR=$1 if [[ -z "$LLVM_DEMANGLE_DIR" ]]; then @@ -21,7 +22,15 @@ echo if [[ $ANSWER =~ ^[Yy]$ ]]; then - for I in $FILES ; do - cp $I $LLVM_DEMANGLE_DIR/$I + cp -f README.txt $LLVM_DEMANGLE_DIR + chmod -w $LLVM_DEMANGLE_DIR/README.txt + for I in $HDRS ; do + rm -f $LLVM_DEMANGLE_DIR/$I + cat >$LLVM_DEMANGLE_DIR/$I <>$LLVM_DEMANGLE_DIR/$I + chmod -w $LLVM_DEMANGLE_DIR/$I done fi Index: llvm/include/llvm/Demangle/ItaniumDemangle.h =================================================================== --- llvm/include/llvm/Demangle/ItaniumDemangle.h +++ llvm/include/llvm/Demangle/ItaniumDemangle.h @@ -1,3 +1,5 @@ +// Do not edit! -*- read-only -*- +// See README.txt for instructions //===------------------------- ItaniumDemangle.h ----------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. Index: llvm/include/llvm/Demangle/StringView.h =================================================================== --- llvm/include/llvm/Demangle/StringView.h +++ llvm/include/llvm/Demangle/StringView.h @@ -1,3 +1,5 @@ +// Do not edit! -*- read-only -*- +// See README.txt for instructions //===--- StringView.h -------------------------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. Index: llvm/include/llvm/Demangle/Utility.h =================================================================== --- llvm/include/llvm/Demangle/Utility.h +++ llvm/include/llvm/Demangle/Utility.h @@ -1,3 +1,5 @@ +// Do not edit! -*- read-only -*- +// See README.txt for instructions //===--- Utility.h ----------------------------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.