[PATCH] D44146: [WebAssembly] Remove duplicated line of code and unreachable check. NFC

Nicholas Wilson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 7 03:18:22 PST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rLLD326888: [WebAssembly] Remove duplicated line of code and unreachable check. NFC (authored by ncw, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D44146?vs=137175&id=137351#toc

Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D44146

Files:
  wasm/Writer.cpp


Index: wasm/Writer.cpp
===================================================================
--- wasm/Writer.cpp
+++ wasm/Writer.cpp
@@ -694,8 +694,9 @@
     for (Symbol *Sym : File->getSymbols()) {
       if (Sym->getFile() != File)
         continue;
-      if (!Sym->isLive())
-        return;
+      // (Since this is relocatable output, GC is not performed so symbols must
+      // be live.)
+      assert(Sym->isLive());
       Sym->setOutputSymbolIndex(SymbolIndex++);
       SymtabEntries.emplace_back(Sym);
     }
@@ -850,7 +851,6 @@
 // in input object.
 void Writer::createCtorFunction() {
   uint32_t FunctionIndex = NumImportedFunctions + InputFunctions.size();
-  WasmSym::CallCtors->setOutputIndex(FunctionIndex);
 
   // First write the body's contents to a string.
   std::string BodyContent;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44146.137351.patch
Type: text/x-patch
Size: 809 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180307/a249f629/attachment.bin>


More information about the llvm-commits mailing list