[PATCH] D37157: Fix Bug 30978 by emitting cv file checksums.
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 7 09:51:47 PDT 2017
rnk added inline comments.
================
Comment at: llvm/lib/MC/MCCodeView.cpp:418-420
// File ids are 1 based, and each file checksum table entry is 8 bytes
// long. See emitFileChecksums above.
+ unsigned FileOffset = 12 * (CurSourceLoc.File - 1);
----------------
We shouldn't assume all DIFiles have MD5 checksums, we'll need some way to know the filechecksum table offset.
We should probably implement this FIXME:
// FIXME: We should store the string table offset of the filename, rather than
// the filename itself for efficiency.
Filename = addToStringTable(Filename);
Filenames[Idx] = Filename;
We should do that by making FIlenames a vector of two integers: the offset of the file in the file checksum table, and the offset of the filename in the string table.
All the places where we do `8 * (FileId - 1)` we would rewrite to use `Filenames[FileId - 1].ChecksumTableOffset`.
https://reviews.llvm.org/D37157
More information about the llvm-commits
mailing list