mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-24 19:46:07 +00:00
Fix unused variable warnings
These warnings came up with gcc-11.3.0.
This commit is contained in:
parent
d92f49fc4b
commit
9e296584ce
@ -1151,7 +1151,7 @@ static void addSynthenticMethnames() {
|
||||
llvm::raw_string_ostream os(data);
|
||||
const int prefixLength = ObjCStubsSection::symbolPrefix.size();
|
||||
for (Symbol *sym : symtab->getSymbols())
|
||||
if (const auto *undefined = dyn_cast<Undefined>(sym))
|
||||
if (isa<Undefined>(sym))
|
||||
if (sym->getName().startswith(ObjCStubsSection::symbolPrefix))
|
||||
os << sym->getName().drop_front(prefixLength) << '\0';
|
||||
|
||||
|
@ -695,7 +695,7 @@ void Writer::scanSymbols() {
|
||||
continue;
|
||||
dysym->getFile()->refState =
|
||||
std::max(dysym->getFile()->refState, dysym->getRefState());
|
||||
} else if (const auto *undefined = dyn_cast<Undefined>(sym)) {
|
||||
} else if (isa<Undefined>(sym)) {
|
||||
if (sym->getName().startswith(ObjCStubsSection::symbolPrefix))
|
||||
in.objcStubs->addEntry(sym);
|
||||
}
|
||||
|
@ -1097,6 +1097,7 @@ void assertArgs(PatternRewriter &rewriter, ArrayRef<PDLValue> values,
|
||||
auto errorFn = [&](const Twine &msg) -> LogicalResult {
|
||||
llvm::report_fatal_error(msg);
|
||||
};
|
||||
(void)errorFn;
|
||||
(assert(succeeded(
|
||||
ProcessPDLValue<typename FnTraitsT::template arg_t<I + 1>>::verifyAsArg(
|
||||
errorFn, values[I], I))),
|
||||
|
@ -240,7 +240,7 @@ void AbstractSparseDataFlowAnalysis::visitRegionSuccessors(
|
||||
|
||||
unsigned firstIndex = 0;
|
||||
if (inputs.size() != lattices.size()) {
|
||||
if (auto *op = point.dyn_cast<Operation *>()) {
|
||||
if (point.dyn_cast<Operation *>()) {
|
||||
if (!inputs.empty())
|
||||
firstIndex = inputs.front().cast<OpResult>().getResultNumber();
|
||||
visitNonControlFlowArgumentsImpl(
|
||||
|
Loading…
x
Reference in New Issue
Block a user