[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 14 16:12:39 PDT 2017
rnk added inline comments.
================
Comment at: llvm/lib/MC/MCCodeView.cpp:169
+ for (auto File : Files) {
+ OS.EmitCVFileChecksumOffsetDirective(File.ChecksumTableOffset,
+ CurrentOffset);
----------------
I don't think you want to do this, this leaks the internal MCSymbol (file1, etc) to the assembler. Nothing in the assembly defines file1, so the assembly isn't very readable.
================
Comment at: llvm/test/DebugInfo/COFF/inlining.ll:52
; ASM: .long 4098 # Type index of inlined function
-; ASM: .long 0 # Offset into filechecksum table
+; ASM: .long file1 # Offset into filechecksum table
; ASM: .long 8 # Starting line number
----------------
What I had in mind was that we'd add a directive like `.cv_filechecksum_offset <fileid>` and MCCodeView.cpp would internally implement it without leaking any labels to the caller. We could use a label difference of two symbols to implement the offset computation, but any symbols shouldn't leak out to the assembler.
https://reviews.llvm.org/D37157
More information about the llvm-commits
mailing list