[PATCH] D42188: [LLD][PDB] Implement FIXME: Warn on missing TypeServer PDB rather than error

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 17 11:14:45 PST 2018


rnk requested changes to this revision.
rnk added a comment.
This revision now requires changes to proceed.

I think the right approach is to propagate failure out of `mergeDebugT` so that we can issue the warning there and then return early from `PDBLinker::addObjFile`. That implements the suggested recovery in the best way possible: linking the object as if it had no debug info.

This is the code in question:

  // Before we can process symbol substreams from .debug$S, we need to process
  // type information, file checksums, and the string table.  Add type info to
  // the PDB first, so that we can get the map from object file type and item
  // indices to PDB type and item indices.
  CVIndexMap ObjectIndexMap;
  const CVIndexMap &IndexMap = mergeDebugT(File, ObjectIndexMap); // --- Make this Expected or Optional, check and return early
  
  // Now do all live .debug$S sections.
  DebugStringTableSubsectionRef CVStrTab;
  DebugChecksumsSubsectionRef Checksums;
  std::vector<ulittle32_t *> StringTableReferences;
  for (SectionChunk *DebugChunk : File->getDebugChunks()) {


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D42188





More information about the llvm-commits mailing list