diff --git a/lld/COFF/PDB.cpp b/lld/COFF/PDB.cpp index a182ed34165de0..6ec2be3da99482 100644 --- a/lld/COFF/PDB.cpp +++ b/lld/COFF/PDB.cpp @@ -726,10 +726,9 @@ static void translateIdSymbols(MutableArrayRef &recordData, // in both cases we just need the second type index. if (!ti->isSimple() && !ti->isNoneType()) { CVType funcIdData = iDTable.getType(*ti); - SmallVector indices; - discoverTypeIndices(funcIdData, indices); - assert(indices.size() == 2); - *ti = indices[1]; + ArrayRef tiBuf = funcIdData.data().slice(8, 4); + assert(tiBuf.size() == 4 && "corruct LF_[MEM]FUNC_ID record"); + *ti = *reinterpret_cast(tiBuf.data()); } kind = (kind == SymbolKind::S_GPROC32_ID) ? SymbolKind::S_GPROC32