sr13225-1dece9.o : fatal error LNK1318: Unexpected PDB error; OK (0) ''
clang: error: linker command failed with exit code 1318 (use -v to see invocation)
<unknown>:0: error: link command failed with exit code 1318 (use -v to see invocation)
UPD
Using lld-link (with assertions enabled) gives more informative output:
Assertion failed: indices.size() == 2, file D:\Development\swift-windows-gha\w\s\llvm-project\lld\COFF\PDB.cpp, line 731
The assertion is located in translateIdSymbols() function:
...
TypeIndex *ti =
reinterpret_cast<TypeIndex *>(content.data() + refs[0].Offset);
// `ti` is the index of a FuncIdRecord or MemberFuncIdRecord which lives in
// the IPI stream, whose `FunctionType` member refers to the TPI stream.
// Note that LF_FUNC_ID and LF_MEMFUNC_ID have the same record layout, and
// in both cases we just need the second type index.
>;if (!ti->isSimple() && !ti->isNoneType()) {
CVType funcIdData = iDTable.getType(*ti);
SmallVector<TypeIndex, 2> indices;
discoverTypeIndices(funcIdData, indices);
assert(indices.size() == 2);
*ti = indices[1];
}
...
Attachment: Download
Environment
Swift version 5.3-dev (LLVM 8cbcb6870920db3, Swift fc4539767b04ffe) Target: x86_64-unknown-windows-msvcAdditional Detail from JIRA
| | | |------------------|-----------------| |Votes | 0 | |Component/s | Compiler | |Labels | Bug, DebugInfo, Windows | |Assignee | None | |Priority | Medium | md5: cae9499a812e80c65bb24b71a5c5a084relates to:
Issue Description:
Similar to SR-10671, but reproducible with different settings and code. Build configuration: Release with Debug Info.
Code contains infinite loop, but it is actually reduced from real-life example where loop contains reachable
break
:Compiler invocation:
Output:
UPD
Using lld-link (with assertions enabled) gives more informative output:
The assertion is located in
translateIdSymbols()
function: