diff --git a/lld/wasm/Writer.cpp b/lld/wasm/Writer.cpp index 8d5b98050cb1..b7adec7ffea0 100644 --- a/lld/wasm/Writer.cpp +++ b/lld/wasm/Writer.cpp @@ -473,7 +473,7 @@ void Writer::populateTargetFeatures() { } } for (const Symbol *sym : out.exportSec->exportedSymbols) { - if (auto *global = dyn_cast(sym)) { + if (isa(sym)) { error(Twine("mutable global exported but 'mutable-globals' feature " "not present in inputs: `") + toString(*sym) + "`. Use --no-check-features to suppress.");