summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCObjectFileInfo.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2013-12-11 21:36:27 +0000
committerDavid Blaikie <dblaikie@gmail.com>2013-12-11 21:36:27 +0000
commit4fe3c00eedd02734eaa8486cb84e66edacc11470 (patch)
tree368ea64bfd823eb9fc87e5bd9618f8d421d5154d /llvm/lib/MC/MCObjectFileInfo.cpp
parent3332d4c75f36db7bba8779c5b0081396da2fa421 (diff)
downloadbcm5719-llvm-4fe3c00eedd02734eaa8486cb84e66edacc11470.tar.gz
bcm5719-llvm-4fe3c00eedd02734eaa8486cb84e66edacc11470.zip
DebugInfo: Move type units into the debug_types section with appropriate comdat grouping and type unit headers
This commit does not complete the type units feature - there are issues around fission support (skeletal type units, pubtypes/pubnames) and hashing of some types including those containing references to types in other type units. llvm-svn: 197073
Diffstat (limited to 'llvm/lib/MC/MCObjectFileInfo.cpp')
-rw-r--r--llvm/lib/MC/MCObjectFileInfo.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCObjectFileInfo.cpp b/llvm/lib/MC/MCObjectFileInfo.cpp
index 8ef4a0a6d7b..da707282479 100644
--- a/llvm/lib/MC/MCObjectFileInfo.cpp
+++ b/llvm/lib/MC/MCObjectFileInfo.cpp
@@ -9,6 +9,7 @@
#include "llvm/MC/MCObjectFileInfo.h"
#include "llvm/ADT/Triple.h"
+#include "llvm/ADT/StringExtras.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCSection.h"
#include "llvm/MC/MCSectionCOFF.h"
@@ -718,6 +719,17 @@ void MCObjectFileInfo::InitMCObjectFileInfo(StringRef TT, Reloc::Model relocm,
}
}
+const MCSection *MCObjectFileInfo::getDwarfTypesSection(uint64_t Hash) const {
+ return Ctx->getELFSection(".debug_types", ELF::SHT_PROGBITS, ELF::SHF_GROUP,
+ SectionKind::getMetadata(), 0, utostr(Hash));
+}
+
+const MCSection *
+MCObjectFileInfo::getDwarfTypesDWOSection(uint64_t Hash) const {
+ return Ctx->getELFSection(".debug_types.dwo", ELF::SHT_GROUP, 0,
+ SectionKind::getMetadata(), 0, utostr(Hash));
+}
+
void MCObjectFileInfo::InitEHFrameSection() {
if (Env == IsMachO)
EHFrameSection =
OpenPOWER on IntegriCloud