summaryrefslogtreecommitdiff
path: root/lib/DebugInfo
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
commit5c9e0e52dab3095291771fba1e63c287d298361b (patch)
tree33b807c6ec2399b3203d50a8552e906de800550a /lib/DebugInfo
parent46f829ee25ed0cba401cd759da684d3c4aa1478a (diff)
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/ git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197275 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/DebugInfo')
-rw-r--r--lib/DebugInfo/DWARFContext.cpp6
-rw-r--r--lib/DebugInfo/DWARFContext.h11
2 files changed, 8 insertions, 9 deletions
diff --git a/lib/DebugInfo/DWARFContext.cpp b/lib/DebugInfo/DWARFContext.cpp
index eaeb2dcc1c3..d10c4b4c310 100644
--- a/lib/DebugInfo/DWARFContext.cpp
+++ b/lib/DebugInfo/DWARFContext.cpp
@@ -297,10 +297,8 @@ void DWARFContext::parseCompileUnits() {
}
void DWARFContext::parseTypeUnits() {
- const std::map<object::SectionRef, Section> &Sections = getTypesSections();
- for (std::map<object::SectionRef, Section>::const_iterator
- I = Sections.begin(),
- E = Sections.end();
+ const TypeSectionMap &Sections = getTypesSections();
+ for (TypeSectionMap::const_iterator I = Sections.begin(), E = Sections.end();
I != E; ++I) {
uint32_t offset = 0;
const DataExtractor &DIData =
diff --git a/lib/DebugInfo/DWARFContext.h b/lib/DebugInfo/DWARFContext.h
index 03863ab8b1e..08006d0d5e5 100644
--- a/lib/DebugInfo/DWARFContext.h
+++ b/lib/DebugInfo/DWARFContext.h
@@ -19,6 +19,7 @@
#include "DWARFTypeUnit.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/SmallVector.h"
+#include "llvm/ADT/MapVector.h"
#include "llvm/DebugInfo/DIContext.h"
namespace llvm {
@@ -138,7 +139,9 @@ public:
virtual bool isLittleEndian() const = 0;
virtual uint8_t getAddressSize() const = 0;
virtual const Section &getInfoSection() = 0;
- virtual const std::map<object::SectionRef, Section> &getTypesSections() = 0;
+ typedef MapVector<object::SectionRef, Section,
+ std::map<object::SectionRef, unsigned> > TypeSectionMap;
+ virtual const TypeSectionMap &getTypesSections() = 0;
virtual StringRef getAbbrevSection() = 0;
virtual const Section &getLocSection() = 0;
virtual StringRef getARangeSection() = 0;
@@ -179,7 +182,7 @@ class DWARFContextInMemory : public DWARFContext {
bool IsLittleEndian;
uint8_t AddressSize;
Section InfoSection;
- std::map<object::SectionRef, Section> TypesSections;
+ TypeSectionMap TypesSections;
StringRef AbbrevSection;
Section LocSection;
StringRef ARangeSection;
@@ -208,9 +211,7 @@ public:
virtual bool isLittleEndian() const { return IsLittleEndian; }
virtual uint8_t getAddressSize() const { return AddressSize; }
virtual const Section &getInfoSection() { return InfoSection; }
- virtual const std::map<object::SectionRef, Section> &getTypesSections() {
- return TypesSections;
- }
+ virtual const TypeSectionMap &getTypesSections() { return TypesSections; }
virtual StringRef getAbbrevSection() { return AbbrevSection; }
virtual const Section &getLocSection() { return LocSection; }
virtual StringRef getARangeSection() { return ARangeSection; }