[llvm] [DebugInfo][LowerConstantIntrinsics] Fix the missing debug location of new branch instruction (PR #97145)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 29 00:23:25 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 3e53c97d33210db68188e731e93ee48dbaeeae32 df13e0f332615bb9f634a1c961d5b44613c9a6ee -- llvm/lib/Transforms/Scalar/LowerConstantIntrinsics.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Transforms/Scalar/LowerConstantIntrinsics.cpp b/llvm/lib/Transforms/Scalar/LowerConstantIntrinsics.cpp
index 709150fb48..bd7895feb6 100644
--- a/llvm/lib/Transforms/Scalar/LowerConstantIntrinsics.cpp
+++ b/llvm/lib/Transforms/Scalar/LowerConstantIntrinsics.cpp
@@ -86,10 +86,10 @@ static bool replaceConditionalBranchesOnConstant(Instruction *II,
BasicBlock *Source = BI->getParent();
Other->removePredecessor(Source);
- Instruction * NewBI = BranchInst::Create(Target, Source);
+ Instruction *NewBI = BranchInst::Create(Target, Source);
NewBI->setDebugLoc(BI->getDebugLoc());
BI->eraseFromParent();
-
+
if (DTU)
DTU->applyUpdates({{DominatorTree::Delete, Source, Other}});
if (pred_empty(Other))
``````````
</details>
https://github.com/llvm/llvm-project/pull/97145
More information about the llvm-commits
mailing list