[PATCH] D43963: [WebAssembly] Simplify writing of exports section. NFC.

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 1 12:56:45 PST 2018

ruiu added a comment.


Comment at: wasm/Writer.cpp:669
+      Export = {Name, WASM_EXTERNAL_GLOBAL, Sym->getOutputIndex()};
+    } else if (auto *D = dyn_cast<DefinedData>(Sym)) {
       if (Sym != WasmSym::DataEnd && Sym != WasmSym::HeapBase)
If you change this line to

  } else {
    auto *D = cast<DefinedData>(Sym);

then you can remove the following llvm_unreachable.

  rLLD LLVM Linker


More information about the llvm-commits mailing list