[clang] [clang][CodeGen][SPIR-V] Fix incorrect SYCL usage, implement missing interface (PR #109415)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 20 05:36:59 PDT 2024
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 2c90eb990af176f2b57baecd2920481243845bb9 75ca598c7e8a583545f50ee2c526556df261cc7f --extensions cpp,h -- clang/lib/Basic/Targets/SPIR.h clang/lib/CodeGen/Targets/SPIR.cpp clang/test/CodeGenCXX/dynamic-cast-address-space.cpp clang/test/CodeGenCXX/spirv-amdgcn-float16.cpp clang/test/CodeGenCXX/template-param-objects-address-space.cpp clang/test/CodeGenCXX/throw-expression-typeinfo-in-address-space.cpp clang/test/CodeGenCXX/try-catch-with-address-space.cpp clang/test/CodeGenCXX/typeid-cxx11-with-address-space.cpp clang/test/CodeGenCXX/typeid-with-address-space.cpp clang/test/CodeGenCXX/typeinfo-with-address-space.cpp clang/test/CodeGenCXX/vtable-assume-load-address-space.cpp clang/test/CodeGenCXX/vtable-pointer-initialization-address-space.cpp clang/test/CodeGenCXX/vtt-address-space.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/CodeGen/Targets/SPIR.cpp b/clang/lib/CodeGen/Targets/SPIR.cpp
index 975b48afa0..ae87506e53 100644
--- a/clang/lib/CodeGen/Targets/SPIR.cpp
+++ b/clang/lib/CodeGen/Targets/SPIR.cpp
@@ -190,8 +190,9 @@ void SPIRVTargetCodeGenInfo::setCUDAKernelCallingConvention(
}
}
-LangAS SPIRVTargetCodeGenInfo::getGlobalVarAddressSpace(
- CodeGenModule &CGM, const VarDecl *D) const {
+LangAS
+SPIRVTargetCodeGenInfo::getGlobalVarAddressSpace(CodeGenModule &CGM,
+ const VarDecl *D) const {
assert(!CGM.getLangOpts().OpenCL &&
!(CGM.getLangOpts().CUDA && CGM.getLangOpts().CUDAIsDevice) &&
"Address space agnostic languages only");
``````````
</details>
https://github.com/llvm/llvm-project/pull/109415
More information about the cfe-commits
mailing list