[clang-cl] function internal linkage with comdat attribute cause linker to assert.
The attached test assert in linker. t.zip
Command line: [1 cmplrllvm-49889]$ clang-cl /Zc:inline /Ob2 /Ox -fprofile-instr-generate=code-%p-%m.profraw -flto main.cpp a.cpp b.cpp outside.cpp -fuse-ld=lld LLVM ERROR: Associative COMDAT symbol '??0?$TInputDataVertexModel@_N@Metasound@@QEAA@AEBVFName@@AEBUFDataVertexMetadata@1@@Z' does not exist. PLEASE submit a bug report to https://software.intel.com/en-us/support/priority-support and include the crash backtrace. Stack dump: 0. Program arguments: d:\iusers\jyu2\git\xmain\builds\xmainefi2win_debug\llvm\bin\lld-link -out:main.exe -libpath:d:\iusers\jyu2\git\xmain\builds\xmainefi2win_debug\llvm\lib\clang\17\lib\windows -nologo -mllvm:-mcpu=x86-64 -opt:lldlto=2 C:\Users\jyu2\AppData\Local\Temp\4\clang-cl.EXE-2d8355\main-0a5bd2.obj C:\Users\jyu2\AppData\Local\Temp\4\clang-cl.EXE-2d8355\a-9f00f7.obj C:\Users\jyu2\AppData\Local\Temp\4\clang-cl.EXE-2d8355\b-7dff4c.obj C:\Users\jyu2\AppData\Local\Temp\4\clang-cl.EXE-2d8355\outside-b50663.obj d:\iusers\jyu2\git\xmain\builds\xmainefi2win_debug\llvm\lib\clang\17\lib\windows\clang_rt.profile-x86_64.lib
-
Running pass 'Function Pass Manager' on module 'ld-temp.o'. -
Running pass 'X86 Assembly Printer' on function '@"??0?$TInputDataVertexModel@_N@Metasound@@QEAA@AEBVFName@@AEBUFDataVertexMetadata@1@@Z.17"'
Exception Code: 0xC000001D
@llvm/issue-subscribers-bug
@llvm/issue-subscribers-clang-frontend
@llvm/issue-subscribers-c-1
https://reviews.llvm.org/D158538
Fix has been checked in
@llvm/issue-subscribers-clang-frontend
@llvm/issue-subscribers-clang-codegen