summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
diff options
context:
space:
mode:
authorWolfgang Pieb <Wolfgang.Pieb@sony.com>2017-07-13 01:03:28 +0000
committerWolfgang Pieb <Wolfgang.Pieb@sony.com>2017-07-13 01:03:28 +0000
commit515d0e50013f529bc489f03624221f701e33c27b (patch)
treeb8b45639a405b618dd0c4954a85dafb8cc2499af /llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
parent4d6ef11e48e18a4125f1d63dd9115564aafd4442 (diff)
downloadbcm5719-llvm-515d0e50013f529bc489f03624221f701e33c27b.tar.gz
bcm5719-llvm-515d0e50013f529bc489f03624221f701e33c27b.zip
[DWARF] Fixing a bug with processing of DWARF v5 indexed strings in Mach-O objects.
Code to convert MachO - specific section debug section names to standard DWARF v5 section names was in the wrong place. Differential Revision: https://reviews.llvm.org/D35321 llvm-svn: 307872
Diffstat (limited to 'llvm/lib/DebugInfo/DWARF/DWARFContext.cpp')
-rw-r--r--llvm/lib/DebugInfo/DWARF/DWARFContext.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
index fe89a418a46..495e09fbae3 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
@@ -964,6 +964,10 @@ DWARFContextInMemory::DWARFContextInMemory(
Name = Name.substr(
Name.find_first_not_of("._z")); // Skip ".", "z" and "_" prefixes.
+ // Map platform specific debug section names to DWARF standard section
+ // names.
+ Name = Obj.mapDebugSectionName(Name);
+
if (StringRef *SectionData = mapSectionToMember(Name)) {
*SectionData = Data;
if (Name == "debug_ranges") {
@@ -978,10 +982,6 @@ DWARFContextInMemory::DWARFContextInMemory(
TypesDWOSections[Section].Data = Data;
}
- // Map platform specific debug section names to DWARF standard section
- // names.
- Name = Obj.mapDebugSectionName(Name);
-
if (RelocatedSection == Obj.section_end())
continue;
OpenPOWER on IntegriCloud