Skip to content

Commit 06e0d17

Browse files
committedMar 7, 2018
[WebAssembly] Remove duplicated line of code and unreachable check. NFC
Differential Revision: https://reviews.llvm.org/D44146 llvm-svn: 326888
1 parent 8269f37 commit 06e0d17

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎lld/wasm/Writer.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -694,8 +694,9 @@ void Writer::assignSymtab() {
694694
for (Symbol *Sym : File->getSymbols()) {
695695
if (Sym->getFile() != File)
696696
continue;
697-
if (!Sym->isLive())
698-
return;
697+
// (Since this is relocatable output, GC is not performed so symbols must
698+
// be live.)
699+
assert(Sym->isLive());
699700
Sym->setOutputSymbolIndex(SymbolIndex++);
700701
SymtabEntries.emplace_back(Sym);
701702
}
@@ -850,7 +851,6 @@ static const int OPCODE_END = 0xb;
850851
// in input object.
851852
void Writer::createCtorFunction() {
852853
uint32_t FunctionIndex = NumImportedFunctions + InputFunctions.size();
853-
WasmSym::CallCtors->setOutputIndex(FunctionIndex);
854854

855855
// First write the body's contents to a string.
856856
std::string BodyContent;

0 commit comments

Comments
 (0)