diff options
author | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2019-03-27 01:13:59 +0000 |
---|---|---|
committer | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2019-03-27 01:13:59 +0000 |
commit | ee1a6e70fa555a305bfc56b1743e98b2a615f05c (patch) | |
tree | d2d35e79ca287de592ed9e2e9226a1bc63329d1e /llvm/lib/MC/MCObjectFileInfo.cpp | |
parent | 8b106be2c7c5d370c222111262035ed05c532fd8 (diff) | |
download | bcm5719-llvm-ee1a6e70fa555a305bfc56b1743e98b2a615f05c.tar.gz bcm5719-llvm-ee1a6e70fa555a305bfc56b1743e98b2a615f05c.zip |
[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
Diffstat (limited to 'llvm/lib/MC/MCObjectFileInfo.cpp')
-rw-r--r-- | llvm/lib/MC/MCObjectFileInfo.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCObjectFileInfo.cpp b/llvm/lib/MC/MCObjectFileInfo.cpp index 1c845f64050..0faa236c153 100644 --- a/llvm/lib/MC/MCObjectFileInfo.cpp +++ b/llvm/lib/MC/MCObjectFileInfo.cpp @@ -290,6 +290,9 @@ void MCObjectFileInfo::initMachOMCObjectFileInfo(const Triple &T) { FaultMapSection = Ctx->getMachOSection("__LLVM_FAULTMAPS", "__llvm_faultmaps", 0, SectionKind::getMetadata()); + RemarksSection = Ctx->getMachOSection( + "__LLVM", "__remarks", MachO::S_ATTR_DEBUG, SectionKind::getMetadata()); + TLSExtraDataSection = TLSTLVSection; } @@ -475,6 +478,9 @@ void MCObjectFileInfo::initELFMCObjectFileInfo(const Triple &T, bool Large) { Ctx->getELFSection(".eh_frame", EHSectionType, EHSectionFlags); StackSizesSection = Ctx->getELFSection(".stack_sizes", ELF::SHT_PROGBITS, 0); + + RemarksSection = + Ctx->getELFSection(".remarks", ELF::SHT_PROGBITS, ELF::SHF_EXCLUDE); } void MCObjectFileInfo::initCOFFMCObjectFileInfo(const Triple &T) { |