Author: Sven van Haastregt Date: 2025-07-09T10:27:30+02:00 New Revision: d45d20e871fa745c63d5c920482874502230772d
URL: https://github.com/llvm/llvm-project/commit/d45d20e871fa745c63d5c920482874502230772d DIFF: https://github.com/llvm/llvm-project/commit/d45d20e871fa745c63d5c920482874502230772d.diff LOG: [OpenCL] Remove image dimensionality comments; NFC (#147312) The code is correct as it aligns with the SPIR-V Specification, but the comment was incorrect. Added: Modified: clang/lib/CodeGen/Targets/SPIR.cpp Removed: ################################################################################ diff --git a/clang/lib/CodeGen/Targets/SPIR.cpp b/clang/lib/CodeGen/Targets/SPIR.cpp index a66de79ed7cd1..d952c6e117607 100644 --- a/clang/lib/CodeGen/Targets/SPIR.cpp +++ b/clang/lib/CodeGen/Targets/SPIR.cpp @@ -322,9 +322,9 @@ static llvm::Type *getSPIRVImageType(llvm::LLVMContext &Ctx, StringRef BaseType, // Choose the dimension of the image--this corresponds to the Dim enum in // SPIR-V (first integer parameter of OpTypeImage). if (OpenCLName.starts_with("image2d")) - IntParams[0] = 1; // 1D + IntParams[0] = 1; else if (OpenCLName.starts_with("image3d")) - IntParams[0] = 2; // 2D + IntParams[0] = 2; else if (OpenCLName == "image1d_buffer") IntParams[0] = 5; // Buffer else _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits