[clang] [CIR][CUDA] Support built-in CUDA texture type (PR #214781)

via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 7 09:21:13 PDT 2026


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp,h -- clang/lib/CIR/CodeGen/CIRGenCUDANV.cpp clang/lib/CIR/CodeGen/CIRGenTypes.cpp clang/lib/CIR/CodeGen/TargetInfo.h clang/lib/CIR/CodeGen/Targets/NVPTX.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/clang/lib/CIR/CodeGen/TargetInfo.h b/clang/lib/CIR/CodeGen/TargetInfo.h
index 03de9f719..e49460ee7 100644
--- a/clang/lib/CIR/CodeGen/TargetInfo.h
+++ b/clang/lib/CIR/CodeGen/TargetInfo.h
@@ -71,7 +71,7 @@ public:
   }
 
   virtual mlir::Type getCUDADeviceBuiltinTextureDeviceType() const {
-  return nullptr;
+    return nullptr;
   }
 
   /// Determine whether a call to an unprototyped functions under
diff --git a/clang/lib/CIR/CodeGen/Targets/NVPTX.cpp b/clang/lib/CIR/CodeGen/Targets/NVPTX.cpp
index 5de0c2f12..8ba34b8a2 100644
--- a/clang/lib/CIR/CodeGen/Targets/NVPTX.cpp
+++ b/clang/lib/CIR/CodeGen/Targets/NVPTX.cpp
@@ -82,7 +82,7 @@ public:
     // On the device side, texture reference is represented as an object handle
     // in 64-bit integer.
     return cir::IntType::get(&getABIInfo().cgt.getMLIRContext(), 64,
-                            /*isSigned=*/true);
+                             /*isSigned=*/true);
   }
 };
 

``````````

</details>


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


More information about the cfe-commits mailing list