[PATCH] D47260: Testcase for dwarf 5 crash/assert when calculating a checksum for an expansion

Paul Robinson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 23 09:36:34 PDT 2018

probinson added a comment.

After thinking about this a bit...  The # directive will cause the filename to be identified as the source for the subsequent lines.  That means it will show up as the original source file in the line table.
However, the compiler doesn't have the actual source file of the header (or the original source file, for that matter) and so cannot compute a correct checksum for it.  That means, it should omit the checksum, for any file identified with a # directive.
I haven't looked at how CodeView handles this situation; for DWARF v5 I made inconsistent use of a checksum into an assertion offense.
Should we reconsider that?  Or have the # directive cause Clang to omit checksums for *all* files, even the one it is actually reading?
@aprantl, @rnk, thoughts?

  rC Clang


More information about the cfe-commits mailing list