Fix the warnings on unused variables (NFC)

This commit is contained in:
Kazu Hirata 2021-01-13 13:32:40 -08:00
parent 4cfccd5133
commit fb98a1be43
3 changed files with 3 additions and 1 deletions

View File

@ -116,6 +116,7 @@ getQualification(ASTContext &Context, const DeclContext *DestContext,
if (auto *TD = llvm::dyn_cast<TagDecl>(CurContext)) {
// There can't be any more tag parents after hitting a namespace.
assert(!ReachedNS);
(void)ReachedNS;
NNS = NestedNameSpecifier::Create(Context, nullptr, false,
TD->getTypeForDecl());
} else {

View File

@ -50,7 +50,7 @@ void InputSection::writeTo(uint8_t *buf) {
// relative to the start of the thread-local data memory area, which
// is initialized via copying all the TLV data sections (which are all
// contiguous).
if (auto *defined = dyn_cast<Defined>(referentSym))
if (isa<Defined>(referentSym))
referentVA -= firstTLVDataSection->addr;
}
} else if (auto *referentIsec = r.referent.dyn_cast<InputSection *>()) {

View File

@ -1538,6 +1538,7 @@ static void rewritePHIs(BasicBlock &BB) {
// CleanupPad with a CatchSwitch predecessor: therefore this is an
// unwind destination that needs to be handle specially.
assert(CS->getUnwindDest() == &BB);
(void)CS;
rewritePHIsForCleanupPad(&BB, CleanupPad);
return;
}