[llvm] [ci] Add ids workflow for checking llvm apis have been annotated with LLVM_ABI (PR #128370)

via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 14 07:30:42 PDT 2025


https://github.com/mcbarton updated https://github.com/llvm/llvm-project/pull/128370

>From ea8b869fe13e67e7d12573d9e425bd3ee00945f4 Mon Sep 17 00:00:00 2001
From: mcbarton <150042563+mcbarton at users.noreply.github.com>
Date: Tue, 7 Jan 2025 09:06:17 +0000
Subject: [PATCH 01/23] Add ids workflow

---
 .github/workflows/ids-check.yml | 77 +++++++++++++++++++++++++++++++++
 1 file changed, 77 insertions(+)
 create mode 100644 .github/workflows/ids-check.yml

diff --git a/.github/workflows/ids-check.yml b/.github/workflows/ids-check.yml
new file mode 100644
index 0000000000000..1817de03b761e
--- /dev/null
+++ b/.github/workflows/ids-check.yml
@@ -0,0 +1,77 @@
+name: ids-check
+on:
+  pull_request:
+    branches: [main]
+  push:
+    branches: [main]
+
+concurrency:
+  group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
+  cancel-in-progress: true
+
+jobs:
+  build:
+    name: ${{ matrix.name }}
+    runs-on: ${{ matrix.os }}
+    strategy:
+      fail-fast: false
+      matrix:
+        include:
+          - name: ids-check
+            os: ubuntu-24.04
+
+    steps:
+    - uses: actions/checkout at v4
+      with:
+        repository: compnerd/ids
+        path: ${{ github.workspace }}/ids
+        fetch-depth: 0
+
+    - uses: actions/checkout at v4
+      with:
+        path: ${{ github.workspace }}/llvm-project
+        fetch-depth: 2
+
+    - name: install dependencies
+      run: |
+        sudo apt install -y clang-18 ninja-build libclang-18-dev
+        pip install lit
+
+    - name: Configure and build minimal LLVM for use by ids
+      run: |
+        cmake -B ${{ github.workspace }}/llvm-project/build/ \
+              -D CMAKE_BUILD_TYPE=Release \
+              -S ${{ github.workspace }}/llvm-project/llvm/ \
+              -D LLVM_ENABLE_PROJECTS=clang \
+              -D LLVM_TARGETS_TO_BUILD="host" \
+              -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
+              -G Ninja
+        cd ${{ github.workspace }}/llvm-project/build/
+        ninja -t targets all | grep "CommonTableGen: phony$" | grep -v "/" | sed 's/:.*//'
+
+    - name: Configure ids
+      run: |
+        cmake -B ${{ github.workspace }}/ids/build/ \
+              -S ${{ github.workspace }}/ids/ \
+               -D CMAKE_BUILD_TYPE=Release \
+               -D CMAKE_C_COMPILER=clang \
+               -D CMAKE_CXX_COMPILER=clang++ \
+               -D CMAKE_EXE_LINKER_FLAGS=-fuse-ld=lld \
+               -D LLVM_DIR=/usr/lib/llvm-18/lib/cmake/llvm/ \
+               -D Clang_DIR=/usr/lib/llvm-18/lib/cmake/clang/ \
+               -D FILECHECK_EXECUTABLE=$(which FileCheck-18) \
+               -D LIT_EXECUTABLE=$(which lit)
+
+    - name: Build ids
+      run: |
+        cmake --build ${{ github.workspace }}/ids/build \
+              --config Release \
+              --parallel $(nproc --all)
+
+    - name: Run ids over compilation database
+      run: |
+        cd ${{ github.workspace }}/llvm-project
+        export H_OR_CPP_FILES_CHANGED_LAST_COMMIT=$(git diff --name-only HEAD~1 HEAD -- '*.cpp' '*.h')
+        if [ ! -z "${H_OR_CPP_FILES_CHANGED_LAST_COMMIT}" ]; then
+          ${{ github.workspace }}/ids/build/bin/idt -p ${{ github.workspace }}/llvm-project/build/compile_commands.json --export-macro=LLVM_ABI $(git diff --name-only HEAD~1 HEAD -- '*.cpp' '*.h')
+        fi

>From 2b5fbeeacffbaae96f1dfe223d5411f7d5e59148 Mon Sep 17 00:00:00 2001
From: mcbarton <matthew.c.barton at hotmail.co.uk>
Date: Tue, 11 Mar 2025 20:38:49 +0000
Subject: [PATCH 02/23] Apply PR suggestions

---
 .github/workflows/ids-check.yml | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/.github/workflows/ids-check.yml b/.github/workflows/ids-check.yml
index 1817de03b761e..4559a0639be8b 100644
--- a/.github/workflows/ids-check.yml
+++ b/.github/workflows/ids-check.yml
@@ -5,20 +5,19 @@ on:
   push:
     branches: [main]
 
+permissions:
+  contents: read
+
 concurrency:
   group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
   cancel-in-progress: true
 
 jobs:
   build:
-    name: ${{ matrix.name }}
-    runs-on: ${{ matrix.os }}
+    name: ids-check
+    runs-on: ubuntu-24.04
     strategy:
       fail-fast: false
-      matrix:
-        include:
-          - name: ids-check
-            os: ubuntu-24.04
 
     steps:
     - uses: actions/checkout at v4

>From faf501715bfaa9034d051979a00a854c9b251010 Mon Sep 17 00:00:00 2001
From: mcbarton <matthew.c.barton at hotmail.co.uk>
Date: Thu, 13 Mar 2025 19:48:21 +0000
Subject: [PATCH 03/23] Apply PR suggestions

---
 .github/workflows/ids-check.yml | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/ids-check.yml b/.github/workflows/ids-check.yml
index 4559a0639be8b..11c119da660be 100644
--- a/.github/workflows/ids-check.yml
+++ b/.github/workflows/ids-check.yml
@@ -14,13 +14,12 @@ concurrency:
 
 jobs:
   build:
+    if: github.repository_owner == 'llvm'
     name: ids-check
     runs-on: ubuntu-24.04
-    strategy:
-      fail-fast: false
 
     steps:
-    - uses: actions/checkout at v4
+    - uses: actions/checkout at 11bd71901bbe5b1630ceea73d27597364c9af683
       with:
         repository: compnerd/ids
         path: ${{ github.workspace }}/ids

>From 0e30999cc1bfe23678591fdb9a0052c9ce7d0099 Mon Sep 17 00:00:00 2001
From: mcbarton <matthew.c.barton at hotmail.co.uk>
Date: Fri, 14 Mar 2025 08:08:46 +0000
Subject: [PATCH 04/23] Apply PR suggestions

---
 .github/workflows/ids-check.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/ids-check.yml b/.github/workflows/ids-check.yml
index 11c119da660be..56b9e275223c8 100644
--- a/.github/workflows/ids-check.yml
+++ b/.github/workflows/ids-check.yml
@@ -19,13 +19,13 @@ jobs:
     runs-on: ubuntu-24.04
 
     steps:
-    - uses: actions/checkout at 11bd71901bbe5b1630ceea73d27597364c9af683
+    - uses: actions/checkout at 11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
       with:
         repository: compnerd/ids
         path: ${{ github.workspace }}/ids
         fetch-depth: 0
 
-    - uses: actions/checkout at v4
+    - uses: actions/checkout at 11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
       with:
         path: ${{ github.workspace }}/llvm-project
         fetch-depth: 2

>From 5b7e71300e5897032815f174de8cdb1393643461 Mon Sep 17 00:00:00 2001
From: mcbarton <matthew.c.barton at hotmail.co.uk>
Date: Sun, 10 Aug 2025 22:00:57 +0100
Subject: [PATCH 05/23] Apply some PR suggestions

---
 .github/workflows/ids-check.yml | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/ids-check.yml b/.github/workflows/ids-check.yml
index 56b9e275223c8..76207218e2355 100644
--- a/.github/workflows/ids-check.yml
+++ b/.github/workflows/ids-check.yml
@@ -69,7 +69,21 @@ jobs:
     - name: Run ids over compilation database
       run: |
         cd ${{ github.workspace }}/llvm-project
-        export H_OR_CPP_FILES_CHANGED_LAST_COMMIT=$(git diff --name-only HEAD~1 HEAD -- '*.cpp' '*.h')
+        export H_OR_CPP_FILES_CHANGED_LAST_COMMIT=$(git diff --name-only HEAD~1 HEAD -- 'llvm/include/llvm/**/*.h' ':!llvm/include/llvm/Debuginfod/' ':!llvm/include/llvm/Demangle/' )
         if [ ! -z "${H_OR_CPP_FILES_CHANGED_LAST_COMMIT}" ]; then
-          ${{ github.workspace }}/ids/build/bin/idt -p ${{ github.workspace }}/llvm-project/build/compile_commands.json --export-macro=LLVM_ABI $(git diff --name-only HEAD~1 HEAD -- '*.cpp' '*.h')
+          for file in $H_OR_CPP_FILES_CHANGED_LAST_COMMIT; do
+            ${{ github.workspace }}/ids/build/bin/idt -p ${{ github.workspace }}/llvm-project/build/compile_commands.json --export-macro=LLVM_ABI --include-header="llvm/Support/Compiler.h" --extra-arg="-DLLVM_ABI=__attribute__((visibility(\"default\")))" --extra-arg="-Wno-macro-redefined" $file
+          done
+        fi
+        export H_OR_CPP_FILES_CHANGED_LAST_COMMIT=$(git diff --name-only HEAD~1 HEAD -- 'llvm/include/llvm-c/**/*.h' )
+        if [ ! -z "${H_OR_CPP_FILES_CHANGED_LAST_COMMIT}" ]; then
+          for file in $H_OR_CPP_FILES_CHANGED_LAST_COMMIT; do
+            ${{ github.workspace }}/ids/build/bin/idt -p ${{ github.workspace }}/llvm-project/build/compile_commands.json --export-macro=LLVM_C_ABI --include-header="llvm-c/Visibility.h" --extra-arg="-DLLVM_C_ABI=__attribute__((visibility(\"default\")))" --extra-arg="-Wno-macro-redefined" $file
+          done
+        fi
+        export H_OR_CPP_FILES_CHANGED_LAST_COMMIT=$(git diff --name-only HEAD~1 HEAD -- 'llvm/include/llvm/Demangle/**/*.h' )
+        if [ ! -z "${H_OR_CPP_FILES_CHANGED_LAST_COMMIT}" ]; then
+          for file in $H_OR_CPP_FILES_CHANGED_LAST_COMMIT; do
+            ${{ github.workspace }}/ids/build/bin/idt -p ${{ github.workspace }}/llvm-project/build/compile_commands.json --export-macro=DEMANGLE_ABI --include-header="llvm/Demangle/Visibility.h" --extra-arg="-DEMANGLE_ABI=__attribute__((visibility(\"default\")))" --extra-arg="-Wno-macro-redefined" $file
+          done
         fi

>From 482545e6787501c1a76319b73482d83a08ddc020 Mon Sep 17 00:00:00 2001
From: mcbarton <matthew.c.barton at hotmail.co.uk>
Date: Tue, 12 Aug 2025 16:18:58 +0100
Subject: [PATCH 06/23] Update to build ids against llvm 19

---
 .github/workflows/ids-check.yml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/ids-check.yml b/.github/workflows/ids-check.yml
index 76207218e2355..c9fe2c8a0f020 100644
--- a/.github/workflows/ids-check.yml
+++ b/.github/workflows/ids-check.yml
@@ -32,7 +32,7 @@ jobs:
 
     - name: install dependencies
       run: |
-        sudo apt install -y clang-18 ninja-build libclang-18-dev
+        sudo apt install -y clang-19 ninja-build libclang-19-dev
         pip install lit
 
     - name: Configure and build minimal LLVM for use by ids
@@ -55,9 +55,9 @@ jobs:
                -D CMAKE_C_COMPILER=clang \
                -D CMAKE_CXX_COMPILER=clang++ \
                -D CMAKE_EXE_LINKER_FLAGS=-fuse-ld=lld \
-               -D LLVM_DIR=/usr/lib/llvm-18/lib/cmake/llvm/ \
-               -D Clang_DIR=/usr/lib/llvm-18/lib/cmake/clang/ \
-               -D FILECHECK_EXECUTABLE=$(which FileCheck-18) \
+               -D LLVM_DIR=/usr/lib/llvm-19/lib/cmake/llvm/ \
+               -D Clang_DIR=/usr/lib/llvm-19/lib/cmake/clang/ \
+               -D FILECHECK_EXECUTABLE=$(which FileCheck-19) \
                -D LIT_EXECUTABLE=$(which lit)
 
     - name: Build ids

>From 7e6e5828afba06e7363eb3f27248c7d578633253 Mon Sep 17 00:00:00 2001
From: mcbarton <matthew.c.barton at hotmail.co.uk>
Date: Tue, 12 Aug 2025 19:17:47 +0100
Subject: [PATCH 07/23] Apply PR suggestion

---
 .github/workflows/ids-check.yml | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/ids-check.yml b/.github/workflows/ids-check.yml
index c9fe2c8a0f020..3eca853e243b0 100644
--- a/.github/workflows/ids-check.yml
+++ b/.github/workflows/ids-check.yml
@@ -1,9 +1,14 @@
 name: ids-check
 on:
   pull_request:
-    branches: [main]
+    types:
+      - opened
+      - synchronize
+      - reopened
   push:
-    branches: [main]
+    branches:
+      - 'main'
+      - 'release/**'
 
 permissions:
   contents: read

>From d30c22e266be60aa7304f1d4431c51a2935dfec3 Mon Sep 17 00:00:00 2001
From: mcbarton <matthew.c.barton at hotmail.co.uk>
Date: Tue, 12 Aug 2025 19:56:25 +0100
Subject: [PATCH 08/23] Add closed to pull request types in ids check workflow
 as per PR recommendation

---
 .github/workflows/ids-check.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.github/workflows/ids-check.yml b/.github/workflows/ids-check.yml
index 3eca853e243b0..9b34aa5e7e678 100644
--- a/.github/workflows/ids-check.yml
+++ b/.github/workflows/ids-check.yml
@@ -5,6 +5,7 @@ on:
       - opened
       - synchronize
       - reopened
+      - closed
   push:
     branches:
       - 'main'

>From 918d0534df8927733e7d901035c176f7a9349d2f Mon Sep 17 00:00:00 2001
From: mcbarton <matthew.c.barton at hotmail.co.uk>
Date: Thu, 14 Aug 2025 07:48:31 +0100
Subject: [PATCH 09/23] Show what happens when ids check workflow fails

---
 llvm/include/llvm/ADT/Any.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/include/llvm/ADT/Any.h b/llvm/include/llvm/ADT/Any.h
index 88dbce96c2c3d..edcec8100afd6 100644
--- a/llvm/include/llvm/ADT/Any.h
+++ b/llvm/include/llvm/ADT/Any.h
@@ -25,7 +25,7 @@
 
 namespace llvm {
 
-class LLVM_ABI Any {
+class Any {
 
   // The `Typeid<T>::Id` static data member below is a globally unique
   // identifier for the type `T`. It is explicitly marked with default

>From 1374b64b3986dbcc58969dc6ad3c2f047d4fed3e Mon Sep 17 00:00:00 2001
From: mcbarton <matthew.c.barton at hotmail.co.uk>
Date: Thu, 14 Aug 2025 11:31:54 +0100
Subject: [PATCH 10/23] Try to make ids workflow fail

---
 .github/workflows/ids-check.yml | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/ids-check.yml b/.github/workflows/ids-check.yml
index 9b34aa5e7e678..4c596d0fbf4e5 100644
--- a/.github/workflows/ids-check.yml
+++ b/.github/workflows/ids-check.yml
@@ -74,22 +74,23 @@ jobs:
 
     - name: Run ids over compilation database
       run: |
+        set -e
         cd ${{ github.workspace }}/llvm-project
         export H_OR_CPP_FILES_CHANGED_LAST_COMMIT=$(git diff --name-only HEAD~1 HEAD -- 'llvm/include/llvm/**/*.h' ':!llvm/include/llvm/Debuginfod/' ':!llvm/include/llvm/Demangle/' )
         if [ ! -z "${H_OR_CPP_FILES_CHANGED_LAST_COMMIT}" ]; then
           for file in $H_OR_CPP_FILES_CHANGED_LAST_COMMIT; do
-            ${{ github.workspace }}/ids/build/bin/idt -p ${{ github.workspace }}/llvm-project/build/compile_commands.json --export-macro=LLVM_ABI --include-header="llvm/Support/Compiler.h" --extra-arg="-DLLVM_ABI=__attribute__((visibility(\"default\")))" --extra-arg="-Wno-macro-redefined" $file
+            ${{ github.workspace }}/ids/build/bin/idt -p ${{ github.workspace }}/llvm-project/build/compile_commands.json  --apply-fixits --export-macro=LLVM_ABI --include-header="llvm/Support/Compiler.h" --extra-arg="-DLLVM_ABI=__attribute__((visibility(\"default\")))" --extra-arg="-Wno-macro-redefined" $file
           done
         fi
         export H_OR_CPP_FILES_CHANGED_LAST_COMMIT=$(git diff --name-only HEAD~1 HEAD -- 'llvm/include/llvm-c/**/*.h' )
         if [ ! -z "${H_OR_CPP_FILES_CHANGED_LAST_COMMIT}" ]; then
           for file in $H_OR_CPP_FILES_CHANGED_LAST_COMMIT; do
-            ${{ github.workspace }}/ids/build/bin/idt -p ${{ github.workspace }}/llvm-project/build/compile_commands.json --export-macro=LLVM_C_ABI --include-header="llvm-c/Visibility.h" --extra-arg="-DLLVM_C_ABI=__attribute__((visibility(\"default\")))" --extra-arg="-Wno-macro-redefined" $file
+            ${{ github.workspace }}/ids/build/bin/idt -p ${{ github.workspace }}/llvm-project/build/compile_commands.json  --apply-fixits --export-macro=LLVM_C_ABI --include-header="llvm-c/Visibility.h" --extra-arg="-DLLVM_C_ABI=__attribute__((visibility(\"default\")))" --extra-arg="-Wno-macro-redefined" $file
           done
         fi
         export H_OR_CPP_FILES_CHANGED_LAST_COMMIT=$(git diff --name-only HEAD~1 HEAD -- 'llvm/include/llvm/Demangle/**/*.h' )
         if [ ! -z "${H_OR_CPP_FILES_CHANGED_LAST_COMMIT}" ]; then
           for file in $H_OR_CPP_FILES_CHANGED_LAST_COMMIT; do
-            ${{ github.workspace }}/ids/build/bin/idt -p ${{ github.workspace }}/llvm-project/build/compile_commands.json --export-macro=DEMANGLE_ABI --include-header="llvm/Demangle/Visibility.h" --extra-arg="-DEMANGLE_ABI=__attribute__((visibility(\"default\")))" --extra-arg="-Wno-macro-redefined" $file
+            ${{ github.workspace }}/ids/build/bin/idt -p ${{ github.workspace }}/llvm-project/build/compile_commands.json  --apply-fixits --export-macro=DEMANGLE_ABI --include-header="llvm/Demangle/Visibility.h" --extra-arg="-DEMANGLE_ABI=__attribute__((visibility(\"default\")))" --extra-arg="-Wno-macro-redefined" $file
           done
         fi

>From b01c06a6aefbb268ea8bedffb92549e06e54f6e0 Mon Sep 17 00:00:00 2001
From: mcbarton <matthew.c.barton at hotmail.co.uk>
Date: Thu, 14 Aug 2025 11:44:11 +0100
Subject: [PATCH 11/23] Revert --apply-fixits and set -e changes, and change to
 a Windows Github runner

---
 .github/workflows/ids-check.yml | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/.github/workflows/ids-check.yml b/.github/workflows/ids-check.yml
index 4c596d0fbf4e5..36c2eded9269a 100644
--- a/.github/workflows/ids-check.yml
+++ b/.github/workflows/ids-check.yml
@@ -1,4 +1,4 @@
-name: ids-check
+cname: ids-check
 on:
   pull_request:
     types:
@@ -22,7 +22,7 @@ jobs:
   build:
     if: github.repository_owner == 'llvm'
     name: ids-check
-    runs-on: ubuntu-24.04
+    runs-on: windows-2025
 
     steps:
     - uses: actions/checkout at 11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -36,12 +36,14 @@ jobs:
         path: ${{ github.workspace }}/llvm-project
         fetch-depth: 2
 
-    - name: install dependencies
+    - name: Install dependencies (Windows)
+      shell: pwsh
       run: |
-        sudo apt install -y clang-19 ninja-build libclang-19-dev
+        choco install -y llvm ninja
         pip install lit
 
     - name: Configure and build minimal LLVM for use by ids
+      shell: bash
       run: |
         cmake -B ${{ github.workspace }}/llvm-project/build/ \
               -D CMAKE_BUILD_TYPE=Release \
@@ -54,6 +56,7 @@ jobs:
         ninja -t targets all | grep "CommonTableGen: phony$" | grep -v "/" | sed 's/:.*//'
 
     - name: Configure ids
+      shell: bash
       run: |
         cmake -B ${{ github.workspace }}/ids/build/ \
               -S ${{ github.workspace }}/ids/ \
@@ -67,30 +70,31 @@ jobs:
                -D LIT_EXECUTABLE=$(which lit)
 
     - name: Build ids
+      shell: bash
       run: |
         cmake --build ${{ github.workspace }}/ids/build \
               --config Release \
               --parallel $(nproc --all)
 
     - name: Run ids over compilation database
+      shell: bash
       run: |
-        set -e
         cd ${{ github.workspace }}/llvm-project
         export H_OR_CPP_FILES_CHANGED_LAST_COMMIT=$(git diff --name-only HEAD~1 HEAD -- 'llvm/include/llvm/**/*.h' ':!llvm/include/llvm/Debuginfod/' ':!llvm/include/llvm/Demangle/' )
         if [ ! -z "${H_OR_CPP_FILES_CHANGED_LAST_COMMIT}" ]; then
           for file in $H_OR_CPP_FILES_CHANGED_LAST_COMMIT; do
-            ${{ github.workspace }}/ids/build/bin/idt -p ${{ github.workspace }}/llvm-project/build/compile_commands.json  --apply-fixits --export-macro=LLVM_ABI --include-header="llvm/Support/Compiler.h" --extra-arg="-DLLVM_ABI=__attribute__((visibility(\"default\")))" --extra-arg="-Wno-macro-redefined" $file
+            ${{ github.workspace }}/ids/build/bin/idt -p ${{ github.workspace }}/llvm-project/build/compile_commands.json  --export-macro=LLVM_ABI --include-header="llvm/Support/Compiler.h" --extra-arg="-DLLVM_ABI=__attribute__((visibility(\"default\")))" --extra-arg="-Wno-macro-redefined" $file
           done
         fi
         export H_OR_CPP_FILES_CHANGED_LAST_COMMIT=$(git diff --name-only HEAD~1 HEAD -- 'llvm/include/llvm-c/**/*.h' )
         if [ ! -z "${H_OR_CPP_FILES_CHANGED_LAST_COMMIT}" ]; then
           for file in $H_OR_CPP_FILES_CHANGED_LAST_COMMIT; do
-            ${{ github.workspace }}/ids/build/bin/idt -p ${{ github.workspace }}/llvm-project/build/compile_commands.json  --apply-fixits --export-macro=LLVM_C_ABI --include-header="llvm-c/Visibility.h" --extra-arg="-DLLVM_C_ABI=__attribute__((visibility(\"default\")))" --extra-arg="-Wno-macro-redefined" $file
+            ${{ github.workspace }}/ids/build/bin/idt -p ${{ github.workspace }}/llvm-project/build/compile_commands.json --export-macro=LLVM_C_ABI --include-header="llvm-c/Visibility.h" --extra-arg="-DLLVM_C_ABI=__attribute__((visibility(\"default\")))" --extra-arg="-Wno-macro-redefined" $file
           done
         fi
         export H_OR_CPP_FILES_CHANGED_LAST_COMMIT=$(git diff --name-only HEAD~1 HEAD -- 'llvm/include/llvm/Demangle/**/*.h' )
         if [ ! -z "${H_OR_CPP_FILES_CHANGED_LAST_COMMIT}" ]; then
           for file in $H_OR_CPP_FILES_CHANGED_LAST_COMMIT; do
-            ${{ github.workspace }}/ids/build/bin/idt -p ${{ github.workspace }}/llvm-project/build/compile_commands.json  --apply-fixits --export-macro=DEMANGLE_ABI --include-header="llvm/Demangle/Visibility.h" --extra-arg="-DEMANGLE_ABI=__attribute__((visibility(\"default\")))" --extra-arg="-Wno-macro-redefined" $file
+            ${{ github.workspace }}/ids/build/bin/idt -p ${{ github.workspace }}/llvm-project/build/compile_commands.json --export-macro=DEMANGLE_ABI --include-header="llvm/Demangle/Visibility.h" --extra-arg="-DEMANGLE_ABI=__attribute__((visibility(\"default\")))" --extra-arg="-Wno-macro-redefined" $file
           done
         fi

>From 9d424bcfb27afed89cea178924294f53248b5f2d Mon Sep 17 00:00:00 2001
From: mcbarton <matthew.c.barton at hotmail.co.uk>
Date: Thu, 14 Aug 2025 11:45:04 +0100
Subject: [PATCH 12/23] Update ids-check.yml

---
 .github/workflows/ids-check.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/ids-check.yml b/.github/workflows/ids-check.yml
index 36c2eded9269a..36332e2a45551 100644
--- a/.github/workflows/ids-check.yml
+++ b/.github/workflows/ids-check.yml
@@ -1,4 +1,4 @@
-cname: ids-check
+name: ids-check
 on:
   pull_request:
     types:

>From 883c1e219b232b08c5b93d6430fcc052319b5839 Mon Sep 17 00:00:00 2001
From: mcbarton <matthew.c.barton at hotmail.co.uk>
Date: Thu, 14 Aug 2025 11:52:54 +0100
Subject: [PATCH 13/23] Fix Windows build of ids and llvm in ids check workflow

---
 .github/workflows/ids-check.yml | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/.github/workflows/ids-check.yml b/.github/workflows/ids-check.yml
index 36332e2a45551..1efb69e306aa9 100644
--- a/.github/workflows/ids-check.yml
+++ b/.github/workflows/ids-check.yml
@@ -36,7 +36,7 @@ jobs:
         path: ${{ github.workspace }}/llvm-project
         fetch-depth: 2
 
-    - name: Install dependencies (Windows)
+    - name: Install dependencies
       shell: pwsh
       run: |
         choco install -y llvm ninja
@@ -45,9 +45,9 @@ jobs:
     - name: Configure and build minimal LLVM for use by ids
       shell: bash
       run: |
-        cmake -B ${{ github.workspace }}/llvm-project/build/ \
+        cmake -B C:/a/llvm-project/llvm-project/llvm-project/build/ \
               -D CMAKE_BUILD_TYPE=Release \
-              -S ${{ github.workspace }}/llvm-project/llvm/ \
+              -S C:/a/llvm-project/llvm-project/llvm-project/llvm/ \
               -D LLVM_ENABLE_PROJECTS=clang \
               -D LLVM_TARGETS_TO_BUILD="host" \
               -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
@@ -58,21 +58,21 @@ jobs:
     - name: Configure ids
       shell: bash
       run: |
-        cmake -B ${{ github.workspace }}/ids/build/ \
-              -S ${{ github.workspace }}/ids/ \
+        cmake -B C:/a/llvm-project/llvm-project/ids/build/ \
+              -S C:/a/llvm-project/llvm-project/ids/ \
                -D CMAKE_BUILD_TYPE=Release \
                -D CMAKE_C_COMPILER=clang \
                -D CMAKE_CXX_COMPILER=clang++ \
                -D CMAKE_EXE_LINKER_FLAGS=-fuse-ld=lld \
-               -D LLVM_DIR=/usr/lib/llvm-19/lib/cmake/llvm/ \
-               -D Clang_DIR=/usr/lib/llvm-19/lib/cmake/clang/ \
+               -D LLVM_DIR="C:/Program Files/LLVM/lib/cmake/llvm/" \
+               -D Clang_DIR="C:/Program Files/LLVM/lib/cmake/clang/" \
                -D FILECHECK_EXECUTABLE=$(which FileCheck-19) \
                -D LIT_EXECUTABLE=$(which lit)
 
     - name: Build ids
       shell: bash
       run: |
-        cmake --build ${{ github.workspace }}/ids/build \
+        cmake --build C:/a/llvm-project/llvm-project/ids/build \
               --config Release \
               --parallel $(nproc --all)
 

>From 5e1f19213d09d1acad631a24cfad1fce142865dd Mon Sep 17 00:00:00 2001
From: mcbarton <matthew.c.barton at hotmail.co.uk>
Date: Thu, 14 Aug 2025 11:58:44 +0100
Subject: [PATCH 14/23] Fix Windows runner build of llvm and ids

---
 .github/workflows/ids-check.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/ids-check.yml b/.github/workflows/ids-check.yml
index 1efb69e306aa9..20e28fd6626a0 100644
--- a/.github/workflows/ids-check.yml
+++ b/.github/workflows/ids-check.yml
@@ -52,7 +52,7 @@ jobs:
               -D LLVM_TARGETS_TO_BUILD="host" \
               -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
               -G Ninja
-        cd ${{ github.workspace }}/llvm-project/build/
+        cd C:/a/llvm-project/llvm-project/llvm-project/build/
         ninja -t targets all | grep "CommonTableGen: phony$" | grep -v "/" | sed 's/:.*//'
 
     - name: Configure ids
@@ -79,7 +79,7 @@ jobs:
     - name: Run ids over compilation database
       shell: bash
       run: |
-        cd ${{ github.workspace }}/llvm-project
+        cd C:/a/llvm-project/llvm-project/llvm-project
         export H_OR_CPP_FILES_CHANGED_LAST_COMMIT=$(git diff --name-only HEAD~1 HEAD -- 'llvm/include/llvm/**/*.h' ':!llvm/include/llvm/Debuginfod/' ':!llvm/include/llvm/Demangle/' )
         if [ ! -z "${H_OR_CPP_FILES_CHANGED_LAST_COMMIT}" ]; then
           for file in $H_OR_CPP_FILES_CHANGED_LAST_COMMIT; do

>From 1e6630f4fbfffe7adf7a475b504c5d7532d95c9a Mon Sep 17 00:00:00 2001
From: mcbarton <matthew.c.barton at hotmail.co.uk>
Date: Thu, 14 Aug 2025 12:34:17 +0100
Subject: [PATCH 15/23] Update ids-check.yml

---
 .github/workflows/ids-check.yml | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/ids-check.yml b/.github/workflows/ids-check.yml
index 20e28fd6626a0..3fc6e640df532 100644
--- a/.github/workflows/ids-check.yml
+++ b/.github/workflows/ids-check.yml
@@ -39,7 +39,6 @@ jobs:
     - name: Install dependencies
       shell: pwsh
       run: |
-        choco install -y llvm ninja
         pip install lit
 
     - name: Configure and build minimal LLVM for use by ids
@@ -64,8 +63,8 @@ jobs:
                -D CMAKE_C_COMPILER=clang \
                -D CMAKE_CXX_COMPILER=clang++ \
                -D CMAKE_EXE_LINKER_FLAGS=-fuse-ld=lld \
-               -D LLVM_DIR="C:/Program Files/LLVM/lib/cmake/llvm/" \
-               -D Clang_DIR="C:/Program Files/LLVM/lib/cmake/clang/" \
+               -D LLVM_DIR="/c/Program Files (x86)/LLVM/lib/cmake/llvm/" \
+               -D Clang_DIR="/c/Program Files (x86)/LLVM/lib/cmake/clang/" \
                -D FILECHECK_EXECUTABLE=$(which FileCheck-19) \
                -D LIT_EXECUTABLE=$(which lit)
 

>From 77547338ff84cc356337289b7aaee1f44f316a94 Mon Sep 17 00:00:00 2001
From: mcbarton <matthew.c.barton at hotmail.co.uk>
Date: Thu, 14 Aug 2025 12:47:50 +0100
Subject: [PATCH 16/23] Install llvm 19 via choco

---
 .github/workflows/ids-check.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.github/workflows/ids-check.yml b/.github/workflows/ids-check.yml
index 3fc6e640df532..b2a047867e13c 100644
--- a/.github/workflows/ids-check.yml
+++ b/.github/workflows/ids-check.yml
@@ -39,6 +39,7 @@ jobs:
     - name: Install dependencies
       shell: pwsh
       run: |
+        choco install llvm at 19
         pip install lit
 
     - name: Configure and build minimal LLVM for use by ids

>From acd740162dfa0899a2f124269f9dac7e63ad0aa3 Mon Sep 17 00:00:00 2001
From: mcbarton <matthew.c.barton at hotmail.co.uk>
Date: Thu, 14 Aug 2025 12:52:35 +0100
Subject: [PATCH 17/23] Update ids-check.yml

---
 .github/workflows/ids-check.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/ids-check.yml b/.github/workflows/ids-check.yml
index b2a047867e13c..c0f2e0295b1a8 100644
--- a/.github/workflows/ids-check.yml
+++ b/.github/workflows/ids-check.yml
@@ -39,7 +39,7 @@ jobs:
     - name: Install dependencies
       shell: pwsh
       run: |
-        choco install llvm at 19
+        choco install llvm --version=19.1.5
         pip install lit
 
     - name: Configure and build minimal LLVM for use by ids

>From 35f9e8046eaf083838598160ea8df909b8c17c5c Mon Sep 17 00:00:00 2001
From: mcbarton <matthew.c.barton at hotmail.co.uk>
Date: Thu, 14 Aug 2025 12:56:49 +0100
Subject: [PATCH 18/23] Update ids-check.yml

---
 .github/workflows/ids-check.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/ids-check.yml b/.github/workflows/ids-check.yml
index c0f2e0295b1a8..eaf0dc9895c32 100644
--- a/.github/workflows/ids-check.yml
+++ b/.github/workflows/ids-check.yml
@@ -39,7 +39,7 @@ jobs:
     - name: Install dependencies
       shell: pwsh
       run: |
-        choco install llvm --version=19.1.5
+        choco install llvm --version=19.1.5 --allow-downgrade --force
         pip install lit
 
     - name: Configure and build minimal LLVM for use by ids

>From 4fd13639920290070664fabf98618098009339e2 Mon Sep 17 00:00:00 2001
From: mcbarton <matthew.c.barton at hotmail.co.uk>
Date: Thu, 14 Aug 2025 15:02:30 +0100
Subject: [PATCH 19/23] Update ids-check.yml

---
 .github/workflows/ids-check.yml | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/ids-check.yml b/.github/workflows/ids-check.yml
index eaf0dc9895c32..4c18a1677bc1a 100644
--- a/.github/workflows/ids-check.yml
+++ b/.github/workflows/ids-check.yml
@@ -39,8 +39,9 @@ jobs:
     - name: Install dependencies
       shell: pwsh
       run: |
-        choco install llvm --version=19.1.5 --allow-downgrade --force
-        pip install lit
+        Invoke-WebRequest -Uri "https://github.com/llvm/llvm-project/releases/download/llvmorg-19.1.7/clang+llvm-19.1.7-x86_64-pc-windows-msvc.tar.xz" -OutFile "clang19.tar.xz"
+        & "C:\Program Files\Git\usr\bin\tar.exe" -xvf .\clang19.tar.xz
+        pip install lit filecheck
 
     - name: Configure and build minimal LLVM for use by ids
       shell: bash
@@ -64,8 +65,8 @@ jobs:
                -D CMAKE_C_COMPILER=clang \
                -D CMAKE_CXX_COMPILER=clang++ \
                -D CMAKE_EXE_LINKER_FLAGS=-fuse-ld=lld \
-               -D LLVM_DIR="/c/Program Files (x86)/LLVM/lib/cmake/llvm/" \
-               -D Clang_DIR="/c/Program Files (x86)/LLVM/lib/cmake/clang/" \
+               -D LLVM_DIR="C:/a/llvm-project/clang19/lib/cmake/llvm/" \
+               -D Clang_DIR="C:/a/llvm-project/clang19/lib/cmake/clang/" \
                -D FILECHECK_EXECUTABLE=$(which FileCheck-19) \
                -D LIT_EXECUTABLE=$(which lit)
 

>From f6ea7068d2e723893bf862206b4c8e351dc7f5a8 Mon Sep 17 00:00:00 2001
From: mcbarton <matthew.c.barton at hotmail.co.uk>
Date: Thu, 14 Aug 2025 15:07:47 +0100
Subject: [PATCH 20/23] Update ids-check.yml

---
 .github/workflows/ids-check.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/ids-check.yml b/.github/workflows/ids-check.yml
index 4c18a1677bc1a..ccaea714c46b2 100644
--- a/.github/workflows/ids-check.yml
+++ b/.github/workflows/ids-check.yml
@@ -65,8 +65,8 @@ jobs:
                -D CMAKE_C_COMPILER=clang \
                -D CMAKE_CXX_COMPILER=clang++ \
                -D CMAKE_EXE_LINKER_FLAGS=-fuse-ld=lld \
-               -D LLVM_DIR="C:/a/llvm-project/clang19/lib/cmake/llvm/" \
-               -D Clang_DIR="C:/a/llvm-project/clang19/lib/cmake/clang/" \
+               -D LLVM_DIR="C:/a/llvm-project/clang+llvm-19.1.7-x86_64-pc-windows-msvc//lib/cmake/llvm/" \
+               -D Clang_DIR="C:/a/llvm-project/clang+llvm-19.1.7-x86_64-pc-windows-msvc/lib/cmake/clang/" \
                -D FILECHECK_EXECUTABLE=$(which FileCheck-19) \
                -D LIT_EXECUTABLE=$(which lit)
 

>From 6b9d0ad47701dc47aa6ccb2f1661041fe7a290ef Mon Sep 17 00:00:00 2001
From: mcbarton <matthew.c.barton at hotmail.co.uk>
Date: Thu, 14 Aug 2025 15:14:24 +0100
Subject: [PATCH 21/23] Update ids-check.yml

---
 .github/workflows/ids-check.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/ids-check.yml b/.github/workflows/ids-check.yml
index ccaea714c46b2..3e066ade5a173 100644
--- a/.github/workflows/ids-check.yml
+++ b/.github/workflows/ids-check.yml
@@ -65,9 +65,9 @@ jobs:
                -D CMAKE_C_COMPILER=clang \
                -D CMAKE_CXX_COMPILER=clang++ \
                -D CMAKE_EXE_LINKER_FLAGS=-fuse-ld=lld \
-               -D LLVM_DIR="C:/a/llvm-project/clang+llvm-19.1.7-x86_64-pc-windows-msvc//lib/cmake/llvm/" \
+               -D LLVM_DIR="C:/a/llvm-project/clang+llvm-19.1.7-x86_64-pc-windows-msvc/lib/cmake/llvm/llvm/" \
                -D Clang_DIR="C:/a/llvm-project/clang+llvm-19.1.7-x86_64-pc-windows-msvc/lib/cmake/clang/" \
-               -D FILECHECK_EXECUTABLE=$(which FileCheck-19) \
+               -D FILECHECK_EXECUTABLE=$(which filecheck) \
                -D LIT_EXECUTABLE=$(which lit)
 
     - name: Build ids

>From dd06f6bebb9cb303332bc67c738ba6863a7600b5 Mon Sep 17 00:00:00 2001
From: mcbarton <matthew.c.barton at hotmail.co.uk>
Date: Thu, 14 Aug 2025 15:21:04 +0100
Subject: [PATCH 22/23] Debug ids-check.yml

---
 .github/workflows/ids-check.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/ids-check.yml b/.github/workflows/ids-check.yml
index 3e066ade5a173..3aa10af29ab77 100644
--- a/.github/workflows/ids-check.yml
+++ b/.github/workflows/ids-check.yml
@@ -65,7 +65,7 @@ jobs:
                -D CMAKE_C_COMPILER=clang \
                -D CMAKE_CXX_COMPILER=clang++ \
                -D CMAKE_EXE_LINKER_FLAGS=-fuse-ld=lld \
-               -D LLVM_DIR="C:/a/llvm-project/clang+llvm-19.1.7-x86_64-pc-windows-msvc/lib/cmake/llvm/llvm/" \
+               -D LLVM_DIR="C:/a/llvm-project/clang+llvm-19.1.7-x86_64-pc-windows-msvc/lib/cmake/llvm/" \
                -D Clang_DIR="C:/a/llvm-project/clang+llvm-19.1.7-x86_64-pc-windows-msvc/lib/cmake/clang/" \
                -D FILECHECK_EXECUTABLE=$(which filecheck) \
                -D LIT_EXECUTABLE=$(which lit)

>From 4a6374bba550f6f2224a42a2eb067db9fa26b00b Mon Sep 17 00:00:00 2001
From: mcbarton <matthew.c.barton at hotmail.co.uk>
Date: Thu, 14 Aug 2025 15:30:19 +0100
Subject: [PATCH 23/23] debug ids-check.yml

---
 .github/workflows/ids-check.yml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/.github/workflows/ids-check.yml b/.github/workflows/ids-check.yml
index 3aa10af29ab77..0a9b787918ac3 100644
--- a/.github/workflows/ids-check.yml
+++ b/.github/workflows/ids-check.yml
@@ -41,6 +41,9 @@ jobs:
       run: |
         Invoke-WebRequest -Uri "https://github.com/llvm/llvm-project/releases/download/llvmorg-19.1.7/clang+llvm-19.1.7-x86_64-pc-windows-msvc.tar.xz" -OutFile "clang19.tar.xz"
         & "C:\Program Files\Git\usr\bin\tar.exe" -xvf .\clang19.tar.xz
+        $env:PWD_DIR= $PWD.Path
+        echo "PWD_DIR=$env:PWD_DIR"
+        ls
         pip install lit filecheck
 
     - name: Configure and build minimal LLVM for use by ids



More information about the llvm-commits mailing list