diff --git a/lld/test/wasm/lto/comdat.ll b/lld/test/wasm/lto/comdat.ll --- a/lld/test/wasm/lto/comdat.ll +++ b/lld/test/wasm/lto/comdat.ll @@ -1,15 +1,17 @@ ; Verify that comdat symbols can be defined in LTO objects. We had a ; regression where the comdat handling code was causing symbol in the lto object ; to be ignored. -; RUN: llvm-as %s -o %t.o -; RUN: wasm-ld %t.o %t.o -o %t.wasm +; RUN: llvm-as %s -o %t.bc +; RUN: llc -filetype=obj %s -o %t.o +; RUN: wasm-ld %t.bc %t.o -o %t.wasm +; RUN: wasm-ld %t.o %t.bc -o %t.wasm target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128" target triple = "wasm32-unknown-unknown" $foo = comdat any -define linkonce_odr void @_start() comdat($foo) { +define void @_start() comdat($foo) { entry: ret void } diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst --- a/llvm/docs/LangRef.rst +++ b/llvm/docs/LangRef.rst @@ -862,7 +862,8 @@ Comdats ------- -Comdat IR provides access to COFF and ELF object file COMDAT functionality. +Comdat IR provides access to COFF, WebAssembly and ELF object file COMDAT +functionality. Comdats have a name which represents the COMDAT key. All global objects that specify this key will only end up in the final object file if the linker chooses