[llvm] [StackSafetyAnalysis] Don't call getTruncateOrZeroExtend for pointers of different sizes (PR #79804)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 30 00:03:05 PST 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 4118082f651a05cca258c684ab1199578b57afac 8e4fc3c8ec60dace5bdb9f40425b54c4c25963c0 -- llvm/lib/Analysis/StackSafetyAnalysis.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Analysis/StackSafetyAnalysis.cpp b/llvm/lib/Analysis/StackSafetyAnalysis.cpp
index a1cde9b8ed..7acae15e24 100644
--- a/llvm/lib/Analysis/StackSafetyAnalysis.cpp
+++ b/llvm/lib/Analysis/StackSafetyAnalysis.cpp
@@ -280,7 +280,7 @@ const SCEV *StackSafetyLocalAnalysis::getSCEVAsPointer(Value *Val) {
Type *ValTy = Val->getType();
// We don't handle targets with multiple address spaces.
- if(!ValTy->isPointerTy()) {
+ if (!ValTy->isPointerTy()) {
auto *PtrTy = PointerType::getUnqual(SE.getContext());
return SE.getTruncateOrZeroExtend(SE.getSCEV(Val), PtrTy);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/79804
More information about the llvm-commits
mailing list