diff --git a/lld/test/wasm/weak-and-strong-undef.s b/lld/test/wasm/weak-and-strong-undef.s --- a/lld/test/wasm/weak-and-strong-undef.s +++ b/lld/test/wasm/weak-and-strong-undef.s @@ -1,5 +1,5 @@ -# Test that when a symbol (foo) is both weakly and stronly undefined the -# string undefined symbol alwaeys generates an error, whichever object +# Test that when a symbol (foo) is both weakly and strongly referenced +# the strong undefined symbol always generates an error, whichever object # file is seen first. # RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %s -o %t1.o diff --git a/lld/wasm/SymbolTable.cpp b/lld/wasm/SymbolTable.cpp --- a/lld/wasm/SymbolTable.cpp +++ b/lld/wasm/SymbolTable.cpp @@ -427,7 +427,7 @@ *importModule + " in " + toString(file)); } - // Update symbol binding, if the existing symbols is weak + // Update symbol binding, if the existing symbol is weak uint32_t binding = flags & WASM_SYMBOL_BINDING_MASK; if (existing->isWeak() && binding != WASM_SYMBOL_BINDING_WEAK) { existing->flags = (existing->flags & ~WASM_SYMBOL_BINDING_MASK) | binding; @@ -471,9 +471,9 @@ existingFunction->signature = sig; auto *existingUndefined = dyn_cast(existingFunction); if (isCalledDirectly && !signatureMatches(existingFunction, sig)) { - // If the existing undefined functions is not called direcltly then let + // If the existing undefined functions is not called directly then let // this one take precedence. Otherwise the existing function is either - // direclty called or defined, in which case we need a function variant. + // directly called or defined, in which case we need a function variant. if (existingUndefined && !existingUndefined->isCalledDirectly) replaceSym(); else if (getFunctionVariant(s, sig, file, &s))