[Mlir-commits] [mlir] [mlir][spirv] Add missing #include in SPIRVImageInterfaces.h (PR #153727)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Thu Aug 14 18:53:27 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-mlir

Author: Chenguang Wang (wecing)

<details>
<summary>Changes</summary>

SPIRVImageInterfaces.h.inc uses some types, e.g. mlir::TypedValue, without #include the necessary headers. This is fine most of the time, but we did run into a weird case where bazel fails to compile //mlir:SPIRVImageInterfaces on clang19 for ChromiumOS when parse_headers (see [1]) is specified.

[1]: https://bazel.build/docs/bazel-and-cpp#toolchain-features

---
Full diff: https://github.com/llvm/llvm-project/pull/153727.diff


1 Files Affected:

- (modified) mlir/include/mlir/Dialect/SPIRV/Interfaces/SPIRVImageInterfaces.h (+2) 


``````````diff
diff --git a/mlir/include/mlir/Dialect/SPIRV/Interfaces/SPIRVImageInterfaces.h b/mlir/include/mlir/Dialect/SPIRV/Interfaces/SPIRVImageInterfaces.h
index ca5a1dcd88171..0c70d4fafd246 100644
--- a/mlir/include/mlir/Dialect/SPIRV/Interfaces/SPIRVImageInterfaces.h
+++ b/mlir/include/mlir/Dialect/SPIRV/Interfaces/SPIRVImageInterfaces.h
@@ -9,6 +9,8 @@
 #ifndef MLIR_DIALECT_SPIRV_IMAGE_INTERFACES_H_
 #define MLIR_DIALECT_SPIRV_IMAGE_INTERFACES_H_
 
+#include "mlir/IR/OpDefinition.h"
+
 #include "mlir/Dialect/SPIRV/Interfaces/SPIRVImageInterfaces.h.inc"
 
 #endif // MLIR_DIALECT_SPIRV_IMAGE_INTERFACES_H_

``````````

</details>


https://github.com/llvm/llvm-project/pull/153727


More information about the Mlir-commits mailing list