[WebAssembly] MC: Don't generate extra types for weak alias

Previously we were generating a void(void) function type
for a weak alias.  Update the weak-alias test case to
catch this.

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

llvm-svn: 307194
diff --git a/llvm/lib/MC/WasmObjectWriter.cpp b/llvm/lib/MC/WasmObjectWriter.cpp
index 82352cb..426f7e1 100644
--- a/llvm/lib/MC/WasmObjectWriter.cpp
+++ b/llvm/lib/MC/WasmObjectWriter.cpp
@@ -959,6 +959,10 @@
 
   // Populate the Imports set.
   for (const MCSymbol &S : Asm.symbols()) {
+    // Weak aliases don't have thier own function types.
+    if (S.isVariable())
+      continue;
+
     const auto &WS = static_cast<const MCSymbolWasm &>(S);
     int32_t Type;