[clang] [clang][sycl] Remove support for global_device and global_host AS (PR #194423)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 27 10:48:37 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,cl -- clang/include/clang/Basic/AddressSpaces.h clang/include/clang/Sema/ParsedAttr.h clang/lib/AST/ItaniumMangle.cpp clang/lib/AST/MicrosoftMangle.cpp clang/lib/AST/Type.cpp clang/lib/AST/TypePrinter.cpp clang/lib/Basic/TargetInfo.cpp clang/lib/Basic/Targets/AArch64.h clang/lib/Basic/Targets/AMDGPU.cpp clang/lib/Basic/Targets/DirectX.h clang/lib/Basic/Targets/NVPTX.h clang/lib/Basic/Targets/SPIR.h clang/lib/Basic/Targets/SystemZ.h clang/lib/Basic/Targets/TCE.h clang/lib/Basic/Targets/WebAssembly.h clang/lib/Basic/Targets/X86.h clang/lib/CIR/CodeGen/CIRGenModule.cpp clang/lib/CIR/Dialect/IR/CIRTypes.cpp clang/lib/CodeGen/CodeGenModule.cpp clang/lib/Sema/ParsedAttr.cpp clang/lib/Sema/SemaType.cpp clang/test/AST/language_address_space_attribute.cpp clang/test/CodeGenCXX/mangle-address-space.cpp clang/test/CodeGenOpenCL/address-spaces-conversions.cl clang/test/CodeGenOpenCL/address-spaces.cl clang/test/CodeGenSYCL/address-space-conversions.cpp clang/test/CodeGenSYCL/amd-address-space-conversions.cpp clang/test/CodeGenSYCL/cuda-address-space-conversions.cpp clang/test/SemaSYCL/address-space-conversions.cpp clang/test/SemaTemplate/address_space-dependent.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/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 66f91edc3..8899f597c 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -6008,10 +6008,8 @@ CharUnits CodeGenModule::GetTargetTypeStoreSize(llvm::Type *Ty) const {
LangAS CodeGenModule::GetGlobalVarAddressSpace(const VarDecl *D) {
if (LangOpts.OpenCL) {
LangAS AS = D ? D->getType().getAddressSpace() : LangAS::opencl_global;
- assert(AS == LangAS::opencl_global ||
- AS == LangAS::opencl_constant ||
- AS == LangAS::opencl_local ||
- AS >= LangAS::FirstTargetAddressSpace);
+ assert(AS == LangAS::opencl_global || AS == LangAS::opencl_constant ||
+ AS == LangAS::opencl_local || AS >= LangAS::FirstTargetAddressSpace);
return AS;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/194423
More information about the cfe-commits
mailing list