Index: wasm/InputFiles.cpp =================================================================== --- wasm/InputFiles.cpp +++ wasm/InputFiles.cpp @@ -62,7 +62,7 @@ // Relocations contain either symbol or type indices. This function takes a // relocation and returns relocated index (i.e. translates from the input -// sybmol/type space to the output symbol/type space). +// symbol/type space to the output symbol/type space). uint32_t ObjFile::calcNewIndex(const WasmRelocation &Reloc) const { if (Reloc.Type == R_WEBASSEMBLY_TYPE_INDEX_LEB) { assert(TypeIsUsed[Reloc.Index]); Index: wasm/SymbolTable.cpp =================================================================== --- wasm/SymbolTable.cpp +++ wasm/SymbolTable.cpp @@ -97,6 +97,8 @@ " in " + toString(File)); } +// Check the type of new symbol matches that of the symbol is replacing. +// For functions this can also involve verifying that the signatures match. static void checkFunctionType(Symbol *Existing, const InputFile *File, const WasmSignature *NewSig) { auto ExistingFunction = dyn_cast(Existing); @@ -121,8 +123,6 @@ toString(*NewSig) + " in " + toString(File)); } -// Check the type of new symbol matches that of the symbol is replacing. -// For functions this can also involve verifying that the signatures match. static void checkGlobalType(const Symbol *Existing, const InputFile *File, const WasmGlobalType *NewType) { if (!isa(Existing)) { Index: wasm/Symbols.h =================================================================== --- wasm/Symbols.h +++ wasm/Symbols.h @@ -245,8 +245,6 @@ const WasmGlobalType *GlobalType) : Symbol(Name, K, Flags, F), GlobalType(GlobalType) {} - // Explicit function type, needed for undefined or synthetic functions only. - // For regular defined globals this information comes from the InputChunk. const WasmGlobalType *GlobalType; uint32_t GlobalIndex = INVALID_INDEX; }; @@ -338,7 +336,7 @@ T *replaceSymbol(Symbol *S, ArgT &&... Arg) { static_assert(std::is_trivially_destructible(), "Symbol types must be trivially destructible"); - static_assert(sizeof(T) <= sizeof(SymbolUnion), "Symbol too small"); + static_assert(sizeof(T) <= sizeof(SymbolUnion), "SymbolUnion too small"); static_assert(alignof(T) <= alignof(SymbolUnion), "SymbolUnion not aligned enough"); assert(static_cast(static_cast(nullptr)) == nullptr &&