[clang] [clang][OpenCL][CodeGen][AMDGPU] Do not use `private` as the default AS for when `generic` is available (PR #112442)

via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 15 14:58:02 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 34cdd67c854ba5a7ec557291861f948ef674375f ca9196266653dd796abfad9b4030090fc299eb8a --extensions cpp -- clang/lib/Basic/Targets/AMDGPU.cpp clang/lib/CodeGen/CGBlocks.cpp clang/lib/CodeGen/CGBuiltin.cpp
``````````

</details>

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

``````````diff
diff --git a/clang/lib/CodeGen/CGBlocks.cpp b/clang/lib/CodeGen/CGBlocks.cpp
index c3a2662850..41bb8d19d1 100644
--- a/clang/lib/CodeGen/CGBlocks.cpp
+++ b/clang/lib/CodeGen/CGBlocks.cpp
@@ -1398,7 +1398,7 @@ void CodeGenFunction::setBlockContextParameter(const ImplicitParamDecl *D,
       DI->EmitDeclareOfBlockLiteralArgVariable(
           *BlockInfo, D->getName(), argNum,
           cast<llvm::AllocaInst>(alloc.getPointer()->stripPointerCasts()),
-                                 Builder);
+          Builder);
     }
   }
 
diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp
index 1b01484a46..fb9386aba9 100644
--- a/clang/lib/CodeGen/CGBuiltin.cpp
+++ b/clang/lib/CodeGen/CGBuiltin.cpp
@@ -5859,7 +5859,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
       llvm::Value *TmpPtr = Tmp.getPointer();
       llvm::Value *TmpSize = EmitLifetimeStart(
           CGM.getDataLayout().getTypeAllocSize(Tmp.getElementType()),
-                                               TmpPtr->stripPointerCasts());
+          TmpPtr->stripPointerCasts());
       llvm::Value *ElemPtr;
       // Each of the following arguments specifies the size of the corresponding
       // argument passed to the enqueued block.

``````````

</details>


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


More information about the cfe-commits mailing list