diff --git a/lib/Analysis/BranchProbabilityInfo.cpp b/lib/Analysis/BranchProbabilityInfo.cpp index 2bbf4219d76..798d0785de0 100644 --- a/lib/Analysis/BranchProbabilityInfo.cpp +++ b/lib/Analysis/BranchProbabilityInfo.cpp @@ -1191,6 +1191,7 @@ void BranchProbabilityInfo::setEdgeProbability( // should be within Probs.size / BranchProbability::getDenominator. assert(TotalNumerator <= BranchProbability::getDenominator() + Probs.size()); assert(TotalNumerator >= BranchProbability::getDenominator() - Probs.size()); + (void)TotalNumerator; } void BranchProbabilityInfo::copyEdgeProbabilities(BasicBlock *Src, diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp index 91599e24968..7a24994579b 100644 --- a/lib/AsmParser/LLParser.cpp +++ b/lib/AsmParser/LLParser.cpp @@ -9177,6 +9177,7 @@ bool LLParser::parseOptionalParamAccesses( return true; CallsNum += ParamAccess.Calls.size(); assert(VContexts.size() == CallsNum); + (void)CallsNum; Params.emplace_back(std::move(ParamAccess)); } while (EatIfPresent(lltok::comma)); diff --git a/lib/Target/X86/X86FastISel.cpp b/lib/Target/X86/X86FastISel.cpp index 8a6b9e75efe..44670a9e0f3 100644 --- a/lib/Target/X86/X86FastISel.cpp +++ b/lib/Target/X86/X86FastISel.cpp @@ -2577,6 +2577,7 @@ bool X86FastISel::TryEmitSmallMemcpy(X86AddressMode DestAM, bool RV = X86FastEmitLoad(VT, SrcAM, nullptr, Reg); RV &= X86FastEmitStore(VT, Reg, DestAM); assert(RV && "Failed to emit load or store??"); + (void)RV; unsigned Size = VT.getSizeInBits()/8; Len -= Size; diff --git a/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp b/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp index b630cb46c48..9a3afa9cc92 100644 --- a/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp +++ b/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp @@ -234,6 +234,7 @@ ICallPromotionFunc::getPromotionCandidatesForCallSite( for (uint32_t I = 0; I < NumCandidates; I++) { uint64_t Count = ValueDataRef[I].Count; assert(Count <= TotalCount); + (void)TotalCount; uint64_t Target = ValueDataRef[I].Value; LLVM_DEBUG(dbgs() << " Candidate " << I << " Count=" << Count << " Target_func: " << Target << "\n"); diff --git a/lib/Transforms/Utils/LoopRotationUtils.cpp b/lib/Transforms/Utils/LoopRotationUtils.cpp index 651aaa331cb..ff7905bed91 100644 --- a/lib/Transforms/Utils/LoopRotationUtils.cpp +++ b/lib/Transforms/Utils/LoopRotationUtils.cpp @@ -637,6 +637,7 @@ bool LoopRotate::rotateLoop(Loop *L, bool SimplifiedLatch) { } assert(SplitLatchEdge && "Despite splitting all preds, failed to split latch exit?"); + (void)SplitLatchEdge; } else { // We can fold the conditional branch in the preheader, this makes things // simpler. The first step is to remove the extra edge to the Exit block. diff --git a/utils/TableGen/X86DisassemblerTables.cpp b/utils/TableGen/X86DisassemblerTables.cpp index 0505c08a4f8..2d25289608f 100644 --- a/utils/TableGen/X86DisassemblerTables.cpp +++ b/utils/TableGen/X86DisassemblerTables.cpp @@ -742,6 +742,7 @@ void DisassemblerTables::emitModRMDecision(raw_ostream &o1, raw_ostream &o2, // We assume that the index can fit into uint16_t. assert(sEntryNumber < 65536U && "Index into ModRMDecision is too large for uint16_t!"); + (void)sEntryNumber; ++sTableNumber; }