]> granicus.if.org Git - llvm/commitdiff
"Use" lambda captures which are otherwise only used in asserts. NFC
authorDavid L. Jones <dlj@google.com>
Fri, 13 Jan 2017 21:02:41 +0000 (21:02 +0000)
committerDavid L. Jones <dlj@google.com>
Fri, 13 Jan 2017 21:02:41 +0000 (21:02 +0000)
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291957 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/Hexagon/HexagonBitSimplify.cpp
lib/Transforms/Scalar/SROA.cpp
lib/Transforms/Utils/ValueMapper.cpp

index ef0f18b39f9e703eace8858ac2a60c90f4751268..063aaa7af3da56ec4b1c6b1074b0add0d540644a 100644 (file)
@@ -896,6 +896,7 @@ const TargetRegisterClass *HexagonBitSimplify::getFinalVRegClass(
                   *MRI.getTargetRegisterInfo());
 
   auto VerifySR = [&HRI] (const TargetRegisterClass *RC, unsigned Sub) -> void {
+    (void)HRI;
     assert(Sub == HRI.getHexagonSubRegIndex(RC, Hexagon::ps_sub_lo) ||
            Sub == HRI.getHexagonSubRegIndex(RC, Hexagon::ps_sub_hi));
   };
index bfcb15530ef531d0a63dc9fcb427093b4e8c23bb..4b1dad4f61ff8427d061bc4014f4ca91a90a1d3b 100644 (file)
@@ -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() &&
index 0e9baaf8649d0240dc4a90717ffb8a4417361a2c..f77c10b6dd4730f253f08289bdf4bc1183cd0d1d 100644 (file)
@@ -681,6 +681,7 @@ void MDNodeMapper::mapNodesInPOT(UniquedGraph &G) {
     remapOperands(*ClonedN, [this, &D, &G](Metadata *Old) {
       if (Optional<Metadata *> MappedOp = getMappedOp(Old))
         return *MappedOp;
+      (void)D;
       assert(G.Info[Old].ID > D.ID && "Expected a forward reference");
       return &G.getFwdReference(*cast<MDNode>(Old));
     });