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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307194
91177308-0d34-0410-b5e6-
96231b3b80d8
struct WasmRelocation {
uint32_t Type; // The type of the relocation.
- int32_t Index; // Index into function to global index space.
+ uint32_t Index; // Index into function to global index space.
uint64_t Offset; // Offset from the start of the section.
int64_t Addend; // A value to add to the symbol.
};
// 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;
ret i32 0
}
+; CHECK: - Type: TYPE
+; CHECK-NEXT: Signatures:
+; CHECK-NEXT: - Index: 0
+; CHECK-NEXT: ReturnType: I32
+; CHECK-NEXT: ParamTypes:
+; CHECK-NEXT: - Type: FUNCTION
+; CHECK-NEXT: FunctionTypes: [ 0 ]
+
; CHECK: - Type: EXPORT
; CHECK-NEXT: Exports:
; CHECK-NEXT: - Name: foo
; CHECK-NEXT: Kind: FUNCTION
; CHECK-NEXT: Index: 0
-
; CHECK: - Type: CUSTOM
; CHECK-NEXT: Name: name
; CHECK-NEXT: FunctionNames: