aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/DataLayout.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2023-01-23 10:57:56 -0800
committerKazu Hirata <kazu@google.com>2023-01-23 10:57:56 -0800
commit7d3306fa4285f99cc6d2cf128ed4bd6050b8373c (patch)
tree8da1300c7e56944608ebf7dda215771491f20c76 /llvm/lib/IR/DataLayout.cpp
parent2eef8759152c7aba837addd8e90fda73c9c1f63e (diff)
downloadllvm-7d3306fa4285f99cc6d2cf128ed4bd6050b8373c.zip
llvm-7d3306fa4285f99cc6d2cf128ed4bd6050b8373c.tar.gz
llvm-7d3306fa4285f99cc6d2cf128ed4bd6050b8373c.tar.bz2
[llvm] Fix warnings
This patch fixes: llvm/lib/IR/DataLayout.cpp:942:13: warning: unused variable ‘VecTy’ [-Wunused-variable] llvm/lib/Transforms/IPO/OpenMPOpt.cpp:2899:27: warning: unused variable ‘MI’ [-Wunused-variable]
Diffstat (limited to 'llvm/lib/IR/DataLayout.cpp')
-rw-r--r--llvm/lib/IR/DataLayout.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/DataLayout.cpp b/llvm/lib/IR/DataLayout.cpp
index 289d525..379c6d5 100644
--- a/llvm/lib/IR/DataLayout.cpp
+++ b/llvm/lib/IR/DataLayout.cpp
@@ -939,7 +939,7 @@ std::optional<APInt> DataLayout::getGEPIndexForOffset(Type *&ElemTy,
return getElementIndex(getTypeAllocSize(ElemTy), Offset);
}
- if (auto *VecTy = dyn_cast<VectorType>(ElemTy)) {
+ if (isa<VectorType>(ElemTy)) {
// Vector GEPs are partially broken (e.g. for overaligned element types),
// and may be forbidden in the future, so avoid generating GEPs into
// vectors. See https://discourse.llvm.org/t/67497