diff options
author | Kazu Hirata <kazu@google.com> | 2023-01-23 10:57:56 -0800 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2023-01-23 10:57:56 -0800 |
commit | 7d3306fa4285f99cc6d2cf128ed4bd6050b8373c (patch) | |
tree | 8da1300c7e56944608ebf7dda215771491f20c76 /llvm/lib/IR/DataLayout.cpp | |
parent | 2eef8759152c7aba837addd8e90fda73c9c1f63e (diff) | |
download | llvm-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.cpp | 2 |
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 |