[PATCH] D63178: [lld] Fix type server merging with PDBs without IPI stream

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 12 14:20:41 PDT 2019


rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.

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!



================
Comment at: lld/COFF/PDB.cpp:475-480
+    if (PDBFile.hasPDBIpiStream()) {
+      Expected<pdb::TpiStream &> ExpectedIpi = PDBFile.getPDBIpiStream();
+      if (auto E = ExpectedIpi.takeError())
+        fatal("Error getting type server IPI stream: " +
+              toString(std::move(E)));
+
----------------
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.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63178/new/

https://reviews.llvm.org/D63178





More information about the llvm-commits mailing list