[llvm] r347277 - [WebAssembly] Remove unused function return types (NFC)

Heejin Ahn via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 19 16:38:11 PST 2018


Author: aheejin
Date: Mon Nov 19 16:38:10 2018
New Revision: 347277

URL: http://llvm.org/viewvc/llvm-project?rev=347277&view=rev
Log:
[WebAssembly] Remove unused function return types (NFC)

Reviewers: sbc100

Subscribers: dschuff, jgravelle-google, sunfish, llvm-commits

Differential Revision: https://reviews.llvm.org/D54734

Modified:
    llvm/trunk/lib/MC/WasmObjectWriter.cpp

Modified: llvm/trunk/lib/MC/WasmObjectWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/WasmObjectWriter.cpp?rev=347277&r1=347276&r2=347277&view=diff
==============================================================================
--- llvm/trunk/lib/MC/WasmObjectWriter.cpp (original)
+++ llvm/trunk/lib/MC/WasmObjectWriter.cpp Mon Nov 19 16:38:10 2018
@@ -324,8 +324,8 @@ private:
   uint32_t getRelocationIndexValue(const WasmRelocationEntry &RelEntry);
   uint32_t getFunctionType(const MCSymbolWasm &Symbol);
   uint32_t getEventType(const MCSymbolWasm &Symbol);
-  uint32_t registerFunctionType(const MCSymbolWasm &Symbol);
-  uint32_t registerEventType(const MCSymbolWasm &Symbol);
+  void registerFunctionType(const MCSymbolWasm &Symbol);
+  void registerEventType(const MCSymbolWasm &Symbol);
 };
 
 } // end anonymous namespace
@@ -1078,7 +1078,7 @@ uint32_t WasmObjectWriter::getEventType(
   return TypeIndices[&Symbol];
 }
 
-uint32_t WasmObjectWriter::registerFunctionType(const MCSymbolWasm &Symbol) {
+void WasmObjectWriter::registerFunctionType(const MCSymbolWasm &Symbol) {
   assert(Symbol.isFunction());
 
   WasmSignature S;
@@ -1096,10 +1096,9 @@ uint32_t WasmObjectWriter::registerFunct
   LLVM_DEBUG(dbgs() << "registerFunctionType: " << Symbol
                     << " new:" << Pair.second << "\n");
   LLVM_DEBUG(dbgs() << "  -> type index: " << Pair.first->second << "\n");
-  return Pair.first->second;
 }
 
-uint32_t WasmObjectWriter::registerEventType(const MCSymbolWasm &Symbol) {
+void WasmObjectWriter::registerEventType(const MCSymbolWasm &Symbol) {
   assert(Symbol.isEvent());
 
   // TODO Currently we don't generate imported exceptions, but if we do, we
@@ -1118,7 +1117,6 @@ uint32_t WasmObjectWriter::registerEvent
   LLVM_DEBUG(dbgs() << "registerEventType: " << Symbol << " new:" << Pair.second
                     << "\n");
   LLVM_DEBUG(dbgs() << "  -> type index: " << Pair.first->second << "\n");
-  return Pair.first->second;
 }
 
 static bool isInSymtab(const MCSymbolWasm &Sym) {




More information about the llvm-commits mailing list