[PATCH] D60283: [DebugInfo] Don't emit checksums when compiling a preprocessed CPP

Alexandre Ganea via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 15 06:53:50 PDT 2019


aganea updated this revision to Diff 199599.
aganea marked an inline comment as done.
aganea added a comment.

Updated again with a different solution. We can't just act on `Entry.getFile().hasLineDirectives()` because a directive such as `#line 100` simply overrides the `__LINE__`, not `__FILE__` (we need to retain and hash the previous `__FILE__` in that case). Please see an example here <https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.3.0/com.ibm.zos.v2r3.cbclx01/lc.htm> in the IBM documentation.
Also we can't compare by `FileID` because a `LineEntry` simply stores a string (called filename) but the buffer for that file isn't stored in the SourceManager.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60283/new/

https://reviews.llvm.org/D60283

Files:
  include/clang/Basic/SourceLocation.h
  lib/Basic/SourceManager.cpp
  lib/CodeGen/CGDebugInfo.cpp
  test/CodeGen/Inputs/debug-info-file-checksum-line.cpp
  test/CodeGen/Inputs/debug-info-file-checksum-pre.cpp
  test/CodeGen/debug-info-file-checksum.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60283.199599.patch
Type: text/x-patch
Size: 5606 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190515/a6a4ea3a/attachment.bin>


More information about the cfe-commits mailing list