summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar
diff options
context:
space:
mode:
authorDavid L. Jones <dlj@google.com>2017-01-13 21:02:41 +0000
committerDavid L. Jones <dlj@google.com>2017-01-13 21:02:41 +0000
commit41cecba8e987107c5d8ca4cfb0affde7b4d371a2 (patch)
treecbb86819596bee7ac026d68d08a97482884f3def /llvm/lib/Transforms/Scalar
parent64dc9be7b48e3e3ec1f7dec270bf433d2084915a (diff)
downloadbcm5719-llvm-41cecba8e987107c5d8ca4cfb0affde7b4d371a2.tar.gz
bcm5719-llvm-41cecba8e987107c5d8ca4cfb0affde7b4d371a2.zip
"Use" lambda captures which are otherwise only used in asserts. NFC
Summary: The LLVM coding standards recommend "using" values that are only needed by asserts: http://llvm.org/docs/CodingStandards.html#assert-liberally Without this change, LLVM cannot bootstrap with -Werror as the second stage fails with this new warning: https://reviews.llvm.org/rL291905 See also the previous fixes: https://reviews.llvm.org/rL291916 https://reviews.llvm.org/rL291939 https://reviews.llvm.org/rL291940 https://reviews.llvm.org/rL291941 Reviewers: rsmith Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D28695 llvm-svn: 291957
Diffstat (limited to 'llvm/lib/Transforms/Scalar')
-rw-r--r--llvm/lib/Transforms/Scalar/SROA.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/SROA.cpp b/llvm/lib/Transforms/Scalar/SROA.cpp
index bfcb15530ef..4b1dad4f61f 100644
--- a/llvm/lib/Transforms/Scalar/SROA.cpp
+++ b/llvm/lib/Transforms/Scalar/SROA.cpp
@@ -1825,6 +1825,7 @@ static VectorType *isVectorPromotionViable(Partition &P, const DataLayout &DL) {
// Rank the remaining candidate vector types. This is easy because we know
// they're all integer vectors. We sort by ascending number of elements.
auto RankVectorTypes = [&DL](VectorType *RHSTy, VectorType *LHSTy) {
+ (void)DL;
assert(DL.getTypeSizeInBits(RHSTy) == DL.getTypeSizeInBits(LHSTy) &&
"Cannot have vector types of different sizes!");
assert(RHSTy->getElementType()->isIntegerTy() &&
OpenPOWER on IntegriCloud