git: 2d7d4c66269d - stable/14 - llvm19: permit incremental builds from llvm18

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Mon, 02 Dec 2024 16:53:24 UTC
The branch stable/14 has been updated by dim:

URL: https://cgit.FreeBSD.org/src/commit/?id=2d7d4c66269d25cda284fd7129ae561f40d253a0

commit 2d7d4c66269d25cda284fd7129ae561f40d253a0
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2024-10-23 22:37:28 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2024-12-02 15:47:45 +0000

    llvm19: permit incremental builds from llvm18
    
    Detect and delete out of date clang-tblgen produced output.  I found it
    sufficent for compilation to delete only arm_*.inc files, but it seems
    safer to regenerate all output and a few extra clang-tblgen runs pales
    in comparison to the full build we're doing at this point.
    
    Reviewed by:    dim, emaste
    Differential Revision:  https://reviews.freebsd.org/D47270
    
    (cherry picked from commit 8b2e7da70855e48c0ba8c874fa528b599fb7c9a9)
---
 tools/build/depend-cleanup.sh | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/tools/build/depend-cleanup.sh b/tools/build/depend-cleanup.sh
index 271aac789be3..6da37606300c 100755
--- a/tools/build/depend-cleanup.sh
+++ b/tools/build/depend-cleanup.sh
@@ -166,3 +166,13 @@ if [ -f "$OBJTOP"/rescue/rescue/rescue.mk ] && \
 	echo "removing rescue.mk without nvme_util.o"
 	rm -f "$OBJTOP"/rescue/rescue/rescue.mk
 fi
+
+# 20241018  5deeebd8c6ca   Merge llvm-project release/19.x llvmorg-19.1.2-0-g7ba7d8e2f7b6
+p="$OBJTOP"/lib/clang/libclang/clang/Basic
+f="$p"/arm_mve_builtin_sema.inc
+if [ -e "$f" ]; then
+	if grep -q SemaBuiltinConstantArgRange "$f"; then
+		echo "Removing pre-llvm19 clang-tblgen output"
+		run rm -f "$p"/*.inc
+	fi
+fi