Skip to content

Commit

Permalink
[WebAssembly] Remove duplicated line of code and unreachable check. NFC
Browse files Browse the repository at this point in the history
Differential Revision: https://reviews.llvm.org/D44146

llvm-svn: 326888
  • Loading branch information
NWilson committed Mar 7, 2018
1 parent 8269f37 commit 06e0d17
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lld/wasm/Writer.cpp
Expand Up @@ -694,8 +694,9 @@ void Writer::assignSymtab() {
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);
}
Expand Down Expand Up @@ -850,7 +851,6 @@ static const int OPCODE_END = 0xb;
// 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;
Expand Down

0 comments on commit 06e0d17

Please sign in to comment.