From 51b75b87dbbed24b9c0a809f7e4d22b31923630d Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Fri, 18 Sep 2020 16:10:39 -0700 Subject: [PATCH] [lld][WebAssembly] Fix -Wunused-variable after D87663 --- lld/wasm/Writer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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.");