[llvm] [PPCMergeStringPool] Only replace constant once (PR #92996)

via llvm-commits llvm-commits at lists.llvm.org
Tue May 21 23:46:16 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 c609c04e32ef43f63a6ee54025fadf649c3247cc aedd3c80794c16dff3eae0ca7575e1e897654492 -- llvm/lib/Target/PowerPC/PPCMergeStringPool.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Target/PowerPC/PPCMergeStringPool.cpp b/llvm/lib/Target/PowerPC/PPCMergeStringPool.cpp
index b73e25d37f..309938accd 100644
--- a/llvm/lib/Target/PowerPC/PPCMergeStringPool.cpp
+++ b/llvm/lib/Target/PowerPC/PPCMergeStringPool.cpp
@@ -312,8 +312,8 @@ void PPCMergeStringPool::replaceUsesWithGEP(GlobalVariable *GlobalToReplace,
   Indices.push_back(ConstantInt::get(Type::getInt32Ty(*Context), 0));
   Indices.push_back(ConstantInt::get(Type::getInt32Ty(*Context), ElementIndex));
 
-  Constant *ConstGEP = ConstantExpr::getInBoundsGetElementPtr(
-      PooledStructType, GPool, Indices);
+  Constant *ConstGEP =
+      ConstantExpr::getInBoundsGetElementPtr(PooledStructType, GPool, Indices);
   LLVM_DEBUG(dbgs() << "Replacing this global:\n");
   LLVM_DEBUG(GlobalToReplace->dump());
   LLVM_DEBUG(dbgs() << "with this:\n");

``````````

</details>


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


More information about the llvm-commits mailing list