[PATCH] D34432: [PDB] Add symbols to the PDB
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 21 09:26:02 PDT 2017
ruiu 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;
----------------
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?
================
Comment at: lld/COFF/PDB.cpp:134
+ if (Contents.size() < Ref.Offset + ByteSize) {
+ log("ignoring short symbol record");
+ return false;
----------------
Looks like this should be an error too.
================
Comment at: lld/COFF/PDB.cpp:192
+ if (!discoverTypeIndices(Sym, TypeRefs)) {
+ log("ignoring unknown symbol record with kind 0x" + utohexstr(Sym.kind()));
+ continue;
----------------
error?
https://reviews.llvm.org/D34432
More information about the llvm-commits
mailing list