This is an archive of the discontinued LLVM Phabricator instance.

[lld] Fix type server merging with PDBs without IPI stream
ClosedPublic

Authored by CyberShadow on Jun 11 2019, 5:09 PM.

Details

Summary

PDBs may not necessarily contain an IPI stream. Handle this case
gracefully.

The test case was verified to work with MS link.exe.

Diff Detail

Repository
rL LLVM

Event Timeline

CyberShadow created this revision.Jun 11 2019, 5:09 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 11 2019, 5:09 PM
rnk accepted this revision.Jun 12 2019, 2:18 PM

lgtm

I can apply this and do the requested code golf simplification if you like, but I just wanted to confirm that's OK with you. Thanks for the patch!

lld/COFF/PDB.cpp
475–480 ↗(On Diff #204196)

Maybe we should have an Optional<pdb::TpiStream &> MaybeIpi variable that we check before passing it into the two mergeIdRecords so we don't have to repeat this error handling code.

This revision is now accepted and ready to land.Jun 12 2019, 2:18 PM

Yes, of course. Good idea. Thank you!

This revision was automatically updated to reflect the committed changes.