[lld] 51b75b8 - [lld][WebAssembly] Fix -Wunused-variable after D87663

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 18 16:13:51 PDT 2020


Author: Fangrui Song
Date: 2020-09-18T16:10:39-07:00
New Revision: 51b75b87dbbed24b9c0a809f7e4d22b31923630d

URL: https://github.com/llvm/llvm-project/commit/51b75b87dbbed24b9c0a809f7e4d22b31923630d
DIFF: https://github.com/llvm/llvm-project/commit/51b75b87dbbed24b9c0a809f7e4d22b31923630d.diff

LOG: [lld][WebAssembly] Fix -Wunused-variable after D87663

Added: 
    

Modified: 
    lld/wasm/Writer.cpp

Removed: 
    


################################################################################
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<GlobalSymbol>(sym)) {
+      if (isa<GlobalSymbol>(sym)) {
         error(Twine("mutable global exported but 'mutable-globals' feature "
                     "not present in inputs: `") +
               toString(*sym) + "`. Use --no-check-features to suppress.");


        


More information about the llvm-commits mailing list