Skip to content

Commit

Permalink
[Attributor] Suppress unused warnings when assertions are disabled. NFC
Browse files Browse the repository at this point in the history
  • Loading branch information
ilya-biryukov committed Dec 31, 2019
1 parent a6c59e0 commit 4f82af8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions llvm/lib/Transforms/IPO/Attributor.cpp
Expand Up @@ -5914,6 +5914,7 @@ ChangeStatus Attributor::rewriteFunctionSignatures() {
SmallVector<AttributeSet, 16> NewArgOperandAttributes;
for (unsigned OldArgNum = 0; OldArgNum < ARIs.size(); ++OldArgNum) {
unsigned NewFirstArgNum = NewArgOperands.size();
(void)NewFirstArgNum; // only used inside assert.
if (ArgumentReplacementInfo *ARI = ARIs[OldArgNum]) {
if (ARI->ACSRepairCB)
ARI->ACSRepairCB(*ARI, ACS, NewArgOperands);
Expand Down Expand Up @@ -5974,6 +5975,7 @@ ChangeStatus Attributor::rewriteFunctionSignatures() {
// Use the CallSiteReplacementCreator to create replacement call sites.
bool Success =
checkForAllCallSites(CallSiteReplacementCreator, *OldFn, true, nullptr);
(void)Success;
assert(Success && "Assumed call site replacement to succeed!");

// Rewire the arguments.
Expand Down

0 comments on commit 4f82af8

Please sign in to comment.