[PATCH] D125733: [BOLT][NFC] Suppress unused variable warnings

Amir Ayupov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 17 14:30:45 PDT 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rGc907d6e0e9fd: [BOLT][NFC] Suppress unused variable warnings (authored by Amir).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D125733/new/

https://reviews.llvm.org/D125733

Files:
  bolt/lib/Core/BinaryBasicBlock.cpp
  bolt/lib/Core/BinaryContext.cpp
  bolt/lib/Rewrite/RewriteInstance.cpp


Index: bolt/lib/Rewrite/RewriteInstance.cpp
===================================================================
--- bolt/lib/Rewrite/RewriteInstance.cpp
+++ bolt/lib/Rewrite/RewriteInstance.cpp
@@ -4048,6 +4048,7 @@
 
       if (BSec->getAllocAddress()) {
         assert(!DataWritten && "Writing section twice.");
+        (void)DataWritten;
         SectionData = BSec->getOutputData();
 
         LLVM_DEBUG(dbgs() << "BOLT-DEBUG: " << (Size ? "appending" : "writing")
Index: bolt/lib/Core/BinaryContext.cpp
===================================================================
--- bolt/lib/Core/BinaryContext.cpp
+++ bolt/lib/Core/BinaryContext.cpp
@@ -809,6 +809,7 @@
     break;
   }
   assert(Found && "Label not found");
+  (void)Found;
   MCSymbol *NewLabel = Ctx->createNamedTempSymbol("duplicatedJT");
   JumpTable *NewJT =
       new JumpTable(*NewLabel, JT->getAddress(), JT->EntrySize, JT->Type,
@@ -1172,6 +1173,7 @@
     }
   }
   assert(Valid);
+  (void)Valid;
   generateSymbolHashes();
 }
 
Index: bolt/lib/Core/BinaryBasicBlock.cpp
===================================================================
--- bolt/lib/Core/BinaryBasicBlock.cpp
+++ bolt/lib/Core/BinaryBasicBlock.cpp
@@ -328,6 +328,7 @@
     }
   }
   assert(Erased && "Pred is not a predecessor of this block!");
+  (void)Erased;
 }
 
 void BinaryBasicBlock::removeDuplicateConditionalSuccessor(MCInst *CondBranch) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125733.430188.patch
Type: text/x-patch
Size: 1397 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220517/e923c20d/attachment.bin>


More information about the llvm-commits mailing list