diff --git a/bolt/lib/Core/BinaryBasicBlock.cpp b/bolt/lib/Core/BinaryBasicBlock.cpp index 5f3a3431fcd0..5ff4044e7295 100644 --- a/bolt/lib/Core/BinaryBasicBlock.cpp +++ b/bolt/lib/Core/BinaryBasicBlock.cpp @@ -328,6 +328,7 @@ void BinaryBasicBlock::removePredecessor(BinaryBasicBlock *Pred, } } assert(Erased && "Pred is not a predecessor of this block!"); + (void)Erased; } void BinaryBasicBlock::removeDuplicateConditionalSuccessor(MCInst *CondBranch) { diff --git a/bolt/lib/Core/BinaryContext.cpp b/bolt/lib/Core/BinaryContext.cpp index 6ebed6b68108..dd2a51ceae6f 100644 --- a/bolt/lib/Core/BinaryContext.cpp +++ b/bolt/lib/Core/BinaryContext.cpp @@ -809,6 +809,7 @@ BinaryContext::duplicateJumpTable(BinaryFunction &Function, JumpTable *JT, 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 @@ void BinaryContext::postProcessSymbolTable() { } } assert(Valid); + (void)Valid; generateSymbolHashes(); } diff --git a/bolt/lib/Rewrite/RewriteInstance.cpp b/bolt/lib/Rewrite/RewriteInstance.cpp index dd128161e233..2d3f987af959 100644 --- a/bolt/lib/Rewrite/RewriteInstance.cpp +++ b/bolt/lib/Rewrite/RewriteInstance.cpp @@ -4048,6 +4048,7 @@ void RewriteInstance::rewriteNoteSections() { if (BSec->getAllocAddress()) { assert(!DataWritten && "Writing section twice."); + (void)DataWritten; SectionData = BSec->getOutputData(); LLVM_DEBUG(dbgs() << "BOLT-DEBUG: " << (Size ? "appending" : "writing")