diff options
author | Sourabh Singh Tomar <SourabhSingh.Tomar@amd.com> | 2020-05-30 11:11:09 +0530 |
---|---|---|
committer | Sourabh Singh Tomar <SourabhSingh.Tomar@amd.com> | 2020-05-30 11:13:23 +0530 |
commit | 20c9bb44ec1a4a795215ff6964d264219f9b05f2 (patch) | |
tree | 55affcd4d8b3088f56b781bf2ec8935418307635 /llvm/lib/MC/MCObjectFileInfo.cpp | |
parent | 0800529fe605a03e9da1aca241a377eebcaa8cad (diff) | |
download | llvm-20c9bb44ec1a4a795215ff6964d264219f9b05f2.zip llvm-20c9bb44ec1a4a795215ff6964d264219f9b05f2.tar.gz llvm-20c9bb44ec1a4a795215ff6964d264219f9b05f2.tar.bz2 |
[DWARF5] Added support for emission of .debug_macro.dwo section
This patch adds support for emission of following DWARFv5 macro
forms in .debug_macro.dwo section:
- DW_MACRO_start_file
- DW_MACRO_end_file
- DW_MACRO_define_strx
- DW_MACRO_undef_strx
Reviewed By: dblaikie
Differential Revision: https://reviews.llvm.org/D78866
Diffstat (limited to 'llvm/lib/MC/MCObjectFileInfo.cpp')
-rw-r--r-- | llvm/lib/MC/MCObjectFileInfo.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCObjectFileInfo.cpp b/llvm/lib/MC/MCObjectFileInfo.cpp index f79b068..b77a963 100644 --- a/llvm/lib/MC/MCObjectFileInfo.cpp +++ b/llvm/lib/MC/MCObjectFileInfo.cpp @@ -473,6 +473,8 @@ void MCObjectFileInfo::initELFMCObjectFileInfo(const Triple &T, bool Large) { Ctx->getELFSection(".debug_rnglists.dwo", DebugSecType, ELF::SHF_EXCLUDE); DwarfMacinfoDWOSection = Ctx->getELFSection(".debug_macinfo.dwo", DebugSecType, ELF::SHF_EXCLUDE); + DwarfMacroDWOSection = + Ctx->getELFSection(".debug_macro.dwo", DebugSecType, ELF::SHF_EXCLUDE); DwarfLoclistsDWOSection = Ctx->getELFSection(".debug_loclists.dwo", DebugSecType, ELF::SHF_EXCLUDE); @@ -649,6 +651,11 @@ void MCObjectFileInfo::initCOFFMCObjectFileInfo(const Triple &T) { COFF::IMAGE_SCN_MEM_DISCARDABLE | COFF::IMAGE_SCN_CNT_INITIALIZED_DATA | COFF::IMAGE_SCN_MEM_READ, SectionKind::getMetadata(), "debug_macinfo.dwo"); + DwarfMacroDWOSection = Ctx->getCOFFSection( + ".debug_macro.dwo", + COFF::IMAGE_SCN_MEM_DISCARDABLE | COFF::IMAGE_SCN_CNT_INITIALIZED_DATA | + COFF::IMAGE_SCN_MEM_READ, + SectionKind::getMetadata(), "debug_macro.dwo"); DwarfInfoDWOSection = Ctx->getCOFFSection( ".debug_info.dwo", COFF::IMAGE_SCN_MEM_DISCARDABLE | COFF::IMAGE_SCN_CNT_INITIALIZED_DATA | |