From f6c436e9d712ced3973ada3e6e8048cb11ed631a Mon Sep 17 00:00:00 2001 From: Frederic Riss Date: Fri, 14 Nov 2014 20:33:40 +0000 Subject: [PATCH] COFF: Add support for Dwarf accelerator tables. This allows COFF targets to emit accelerator tables when requested by -dwarf-accel-tables=Enable instead of aborting. The test DebugInfo/cross-cu-inlining.ll covers this on COFF platforms. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222034 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/MC/MCObjectFileInfo.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/lib/MC/MCObjectFileInfo.cpp b/lib/MC/MCObjectFileInfo.cpp index 13f3f6981a1..1b88462c8a1 100644 --- a/lib/MC/MCObjectFileInfo.cpp +++ b/lib/MC/MCObjectFileInfo.cpp @@ -781,6 +781,27 @@ void MCObjectFileInfo::InitCOFFMCObjectFileInfo(Triple T) { COFF::IMAGE_SCN_MEM_READ, SectionKind::getMetadata()); + DwarfAccelNamesSection = + Ctx->getCOFFSection(".apple_names", + COFF::IMAGE_SCN_MEM_DISCARDABLE | + COFF::IMAGE_SCN_MEM_READ, + SectionKind::getMetadata()); + DwarfAccelNamespaceSection = + Ctx->getCOFFSection(".apple_namespaces", + COFF::IMAGE_SCN_MEM_DISCARDABLE | + COFF::IMAGE_SCN_MEM_READ, + SectionKind::getMetadata()); + DwarfAccelTypesSection = + Ctx->getCOFFSection(".apple_types", + COFF::IMAGE_SCN_MEM_DISCARDABLE | + COFF::IMAGE_SCN_MEM_READ, + SectionKind::getMetadata()); + DwarfAccelObjCSection = + Ctx->getCOFFSection(".apple_objc", + COFF::IMAGE_SCN_MEM_DISCARDABLE | + COFF::IMAGE_SCN_MEM_READ, + SectionKind::getMetadata()); + DrectveSection = Ctx->getCOFFSection(".drectve", COFF::IMAGE_SCN_LNK_INFO | -- 2.34.1