[WebAssembly] Include function in wasm table when used in R_WASM_TABLE_INDEX_REL_SLEB

This should have been part of rL357710 but was overlooked because
in our test code the function in question was also used in other
relocations that caused it to be added to the table anyway.

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

llvm-svn: 357737
diff --git a/lld/wasm/Writer.cpp b/lld/wasm/Writer.cpp
index 3450c51..1af186b 100644
--- a/lld/wasm/Writer.cpp
+++ b/lld/wasm/Writer.cpp
@@ -1138,7 +1138,8 @@
   for (const WasmRelocation &Reloc : Chunk->getRelocations()) {
     switch (Reloc.Type) {
     case R_WASM_TABLE_INDEX_I32:
-    case R_WASM_TABLE_INDEX_SLEB: {
+    case R_WASM_TABLE_INDEX_SLEB:
+    case R_WASM_TABLE_INDEX_REL_SLEB: {
       FunctionSymbol *Sym = File->getFunctionSymbol(Reloc.Index);
       if (Sym->hasTableIndex() || !Sym->hasFunctionIndex())
         continue;