aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCObjectFileInfo.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2013-12-13 21:33:40 +0000
committerDavid Blaikie <dblaikie@gmail.com>2013-12-13 21:33:40 +0000
commitbc563276e091029d6a3516323a725f2eaa279ff5 (patch)
tree15904868ed1d90470874adc0d87d0611d0a2a3d2 /llvm/lib/MC/MCObjectFileInfo.cpp
parent88f64e6aebd9ce824f6dfddc2979321e57a80dda (diff)
downloadllvm-bc563276e091029d6a3516323a725f2eaa279ff5.zip
llvm-bc563276e091029d6a3516323a725f2eaa279ff5.tar.gz
llvm-bc563276e091029d6a3516323a725f2eaa279ff5.tar.bz2
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. Originally committed as r197073 and reverted in r197079. Recommitted as r197197 to reproduce the failure and reverted as r197199 Turns out there was unstable ordering in the type unit dumping code. Fixed by using MapVector in DWARFContext to store the debug_types comdat sections. Recommitted as r197210 with a fix to dumping and reverted as r197211 because I was a bit gun shy and thought I saw a failure that turned out to be unrelated. So here we go - once more with feeling! \o/ llvm-svn: 197275
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 8ef4a0a..da70728 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 =