summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCObjectFileInfo.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2017-12-13 22:33:58 +0000
committerZachary Turner <zturner@google.com>2017-12-13 22:33:58 +0000
commit048f8f99bf0292550a8c07a9e6e662b722d7523c (patch)
tree076576e7b59754253f1a3a213f9e3d24aabf5f67 /llvm/lib/MC/MCObjectFileInfo.cpp
parent67b04bd8acd4b048acee7c208b13b46e165a679e (diff)
downloadbcm5719-llvm-048f8f99bf0292550a8c07a9e6e662b722d7523c.tar.gz
bcm5719-llvm-048f8f99bf0292550a8c07a9e6e662b722d7523c.zip
[CodeView] Teach clang to emit the .debug$H COFF section.
Currently this is an LLVM extension to the COFF spec which is experimental and intended to speed up linking. For now it is behind a hidden cl::opt flag, but in the future we can move it to a "real" cc1 flag and have the driver pass it through whenever it is appropriate. The patch to actually make use of this section in lld will come in a followup. Differential Revision: https://reviews.llvm.org/D40917 llvm-svn: 320649
Diffstat (limited to 'llvm/lib/MC/MCObjectFileInfo.cpp')
-rw-r--r--llvm/lib/MC/MCObjectFileInfo.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCObjectFileInfo.cpp b/llvm/lib/MC/MCObjectFileInfo.cpp
index ba0146fd9fc..a6b5c43f1d2 100644
--- a/llvm/lib/MC/MCObjectFileInfo.cpp
+++ b/llvm/lib/MC/MCObjectFileInfo.cpp
@@ -185,6 +185,7 @@ void MCObjectFileInfo::initMachOMCObjectFileInfo(const Triple &T) {
COFFDebugSymbolsSection = nullptr;
COFFDebugTypesSection = nullptr;
+ COFFGlobalTypeHashesSection = nullptr;
if (useCompactUnwind(T)) {
CompactUnwindSection =
@@ -655,6 +656,11 @@ void MCObjectFileInfo::initCOFFMCObjectFileInfo(const Triple &T) {
COFF::IMAGE_SCN_CNT_INITIALIZED_DATA |
COFF::IMAGE_SCN_MEM_READ),
SectionKind::getMetadata());
+ COFFGlobalTypeHashesSection = Ctx->getCOFFSection(
+ ".debug$H",
+ (COFF::IMAGE_SCN_MEM_DISCARDABLE | COFF::IMAGE_SCN_CNT_INITIALIZED_DATA |
+ COFF::IMAGE_SCN_MEM_READ),
+ SectionKind::getMetadata());
DwarfAbbrevSection = Ctx->getCOFFSection(
".debug_abbrev",
OpenPOWER on IntegriCloud