[llvm] 5f306fe - [WebAssembly] Fix warnings

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 9 16:41:59 PDT 2021


Author: Kazu Hirata
Date: 2021-07-09T16:40:01-07:00
New Revision: 5f306feb4d3ff41b5c48e753067de3c93ca4240f

URL: https://github.com/llvm/llvm-project/commit/5f306feb4d3ff41b5c48e753067de3c93ca4240f
DIFF: https://github.com/llvm/llvm-project/commit/5f306feb4d3ff41b5c48e753067de3c93ca4240f.diff

LOG: [WebAssembly] Fix warnings

Added: 
    

Modified: 
    llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp
    llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmTypeCheck.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp b/llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp
index c9f04368feec..eb1dd879941a 100644
--- a/llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp
+++ b/llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp
@@ -321,7 +321,7 @@ class WebAssemblyAsmParser final : public MCTargetAsmParser {
     }
   }
 
-  void push(NestingType NT) { NestingStack.push_back({NT}); }
+  void push(NestingType NT) { NestingStack.push_back({NT, wasm::WasmSignature()}); }
 
   bool pop(StringRef Ins, NestingType NT1, NestingType NT2 = Undefined) {
     if (NestingStack.empty())

diff  --git a/llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmTypeCheck.cpp b/llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmTypeCheck.cpp
index 9142b720c263..e79fcd34c3f3 100644
--- a/llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmTypeCheck.cpp
+++ b/llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmTypeCheck.cpp
@@ -31,6 +31,7 @@
 #include "llvm/MC/MCSubtargetInfo.h"
 #include "llvm/MC/MCSymbol.h"
 #include "llvm/MC/MCSymbolWasm.h"
+#include "llvm/Support/Compiler.h"
 #include "llvm/Support/Endian.h"
 #include "llvm/Support/SourceMgr.h"
 #include "llvm/Support/TargetRegistry.h"
@@ -158,7 +159,7 @@ bool WebAssemblyAsmTypeCheck::getGlobal(SMLoc ErrorLoc, const MCInst &Inst,
       Type = is64 ? wasm::ValType::I64 : wasm::ValType::I32;
       break;
     }
-    // FALLTHRU
+    LLVM_FALLTHROUGH;
   default:
     return typeError(ErrorLoc, StringRef("symbol ") + WasmSym->getName() +
                                     " missing .globaltype");


        


More information about the llvm-commits mailing list