[Remarks] Emit a section containing remark diagnostics metadata
authorFrancis Visoiu Mistrih <francisvm@yahoo.com>
Wed, 27 Mar 2019 01:13:59 +0000 (01:13 +0000)
committerFrancis Visoiu Mistrih <francisvm@yahoo.com>
Wed, 27 Mar 2019 01:13:59 +0000 (01:13 +0000)
commitee1a6e70fa555a305bfc56b1743e98b2a615f05c
treed2d35e79ca287de592ed9e2e9226a1bc63329d1e
parent8b106be2c7c5d370c222111262035ed05c532fd8
[Remarks] Emit a section containing remark diagnostics metadata

A section containing metadata on remark diagnostics will be emitted if
the flag (-mllvm) -remarks-section is present.

For now, the metadata is:

* a magic number for remarks: "REMARKS\0"
* the version number: a little-endian uint64_t
* the absolute file path to the serialized remark diagnostics: a
  null-terminated string.

Differential Revision: https://reviews.llvm.org/D59571

llvm-svn: 357043
llvm/docs/CodeGenerator.rst
llvm/docs/CommandGuide/llc.rst
llvm/include/llvm/CodeGen/AsmPrinter.h
llvm/include/llvm/MC/MCObjectFileInfo.h
llvm/include/llvm/Remarks/Remark.h
llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/lib/MC/MCObjectFileInfo.cpp
llvm/test/CodeGen/X86/remarks-section.ll [new file with mode: 0644]