]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libsanitizer/merge.sh
[C++] Protect call to copy_attributes_to_builtin (PR91505)
[thirdparty/gcc.git] / libsanitizer / merge.sh
index 0f75431cf6853113204f6b18390b826d76724aa2..168fbbc9729d9873c4ca858f41db01e4f22cfedb 100755 (executable)
@@ -4,6 +4,8 @@
 
 # This script merges libsanitizer sources from upstream.
 
+VCS=${1:-svn}
+
 get_upstream() {
   rm -rf upstream
   #cp -rf orig upstream
@@ -16,12 +18,13 @@ get_current_rev() {
 }
 
 list_files() {
-  (cd $1; ls *.{cc,h} 2> /dev/null)
+  (cd $1; ls *.{cc,cpp,h,inc,S} 2> /dev/null)
 
 }
 
 change_comment_headers() {
   for f in $(list_files $1); do
+    sed -n 3p $1/$f | grep -q 'The LLVM Compiler Infrastructure' || continue
     changed=$(awk 'NR != 2 && NR != 3' < $1/$f)
     echo "$changed" > $1/$f
   done
@@ -45,10 +48,10 @@ merge() {
     elif [ -f $upstream_path/$f ]; then
       echo "FOUND IN UPSTREAM :" $f
       cp -v $upstream_path/$f $local_path
-      svn add $local_path/$f
+      $VCS add $local_path/$f
     elif [ -f $local_path/$f ]; then
       echo "FOUND IN LOCAL    :" $f
-      svn remove $local_path/$f
+      $VCS rm $local_path/$f
     fi
   done
 
@@ -66,10 +69,16 @@ CUR_REV=$(get_current_rev)
 echo Current upstream revision: $CUR_REV
 merge include/sanitizer include/sanitizer
 merge lib/asan asan
-merge lib/asan/dynamic asan/dynamic
+merge lib/lsan lsan
 merge lib/tsan/rtl tsan
 merge lib/sanitizer_common sanitizer_common
 merge lib/interception interception
+merge lib/ubsan ubsan
+merge lib/BlocksRuntime/ BlocksRuntime
+
+# Need to merge lib/builtins/assembly.h file:
+mkdir -p builtins
+cp -v upstream/lib/builtins/assembly.h builtins/assembly.h
 
 rm -rf upstream