[PATCH] D34432: [PDB] Add symbols to the PDB

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 21 10:15:48 PDT 2017


rnk added inline comments.


================
Comment at: lld/COFF/PDB.cpp:142-144
+        log("ignoring symbol record in " + File->getName() +
+            " with bad type index 0x" + utohexstr(TI.getIndex()));
+        return false;
----------------
ruiu wrote:
> rnk wrote:
> > ruiu wrote:
> > > You probably want to use `fatal` as this code handles broken input files.
> > It's more likely that our understanding of the record is broken that it is for the record to actually be corrupt. This line actually fires today for files compiled with /Zi, because there's something wrong with our type server handling. libcmt.lib was compiled with /Zi, so any program using the CRT hits this.
> > 
> > I'd rather recover by skipping the record for now. It doesn't result in a broken program, just a less useful PDB.
> Then can you use `error()`, which does not call exit?
I don't want to fail the link, though, so this should ultimately be a warning. It's a "log" for now so that it only shows up under verbose output, because you get 100s of these messages when linking against the STL. We can promote it to a warning later.

The scenario I'm imagining is that MSVC starts emitting a new optimized debug info record that we don't understand. IMO, LLD should ignore the record and emit a warning.


https://reviews.llvm.org/D34432





More information about the llvm-commits mailing list