| # Copies the 'demangle' library, excluding 'DemangleConfig.h', to llvm. If no |
| # llvm directory is specified, then assume a monorepo layout. |
| FILES="ItaniumDemangle.h StringView.h Utility.h README.txt" |
| if [[ -z "$LLVM_DEMANGLE_DIR" ]]; then |
| LLVM_DEMANGLE_DIR="../../../llvm/include/llvm/Demangle" |
| if [[ ! -d "$LLVM_DEMANGLE_DIR" ]]; then |
| echo "No such directory: $LLVM_DEMANGLE_DIR" >&2 |
| read -p "This will overwrite the copies of $FILES in $LLVM_DEMANGLE_DIR; are you sure? [y/N]" -n 1 -r ANSWER |
| if [[ $ANSWER =~ ^[Yy]$ ]]; then |
| cp $I $LLVM_DEMANGLE_DIR/$I |