From c6f8d2ef92fc99aa5faf5bc25ef16fb73b9f4ee0 Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Thu, 15 Jan 2026 15:21:04 +0100 Subject: [PATCH] clc: reorder headers to fix compilation errors due to UNUSED Cc: mesa-stable Acked-by: Alyssa Rosenzweig Part-of: (cherry picked from commit 7f9a7ed5533e2bbc759d667075cccec024490d04) --- .pick_status.json | 2 +- src/compiler/clc/clc_helpers.cpp | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 16b81e94a35..2d634562a9a 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1824,7 +1824,7 @@ "description": "clc: reorder headers to fix compilation errors due to UNUSED", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/compiler/clc/clc_helpers.cpp b/src/compiler/clc/clc_helpers.cpp index 9912f9b0256..a53de675c3e 100644 --- a/src/compiler/clc/clc_helpers.cpp +++ b/src/compiler/clc/clc_helpers.cpp @@ -28,8 +28,6 @@ #include #include -#include "util/ralloc.h" -#include "util/set.h" #include #include #include @@ -68,7 +66,13 @@ #include #endif +/* We have to include our own headers after LLVM/clang as they seem to use + * `UNUSED` within enum definitions: + * https://github.com/llvm/llvm-project/blob/ea443eeb2ab8ed49ffb783c2025fed6629a36f10/clang/include/clang/Basic/OffloadArch.h#L19 + */ #include "util/macros.h" +#include "util/ralloc.h" +#include "util/set.h" #include "util/u_dl.h" #include "glsl_types.h"