diff options
author | Alexey Samsonov <samsonov@google.com> | 2012-11-16 08:36:25 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2012-11-16 08:36:25 +0000 |
commit | 63a450a313a9b0a08622e97b53f5dd83f9266143 (patch) | |
tree | 2531ef315af7cde1f365b1f599e7e34c34585e40 /lib/DebugInfo/DWARFContext.cpp | |
parent | 9bd4dd742e20e99e8bc31c510ee790c95f680993 (diff) | |
download | external_llvm-63a450a313a9b0a08622e97b53f5dd83f9266143.zip external_llvm-63a450a313a9b0a08622e97b53f5dd83f9266143.tar.gz external_llvm-63a450a313a9b0a08622e97b53f5dd83f9266143.tar.bz2 |
[DebugInfo] Generate address ranges for compile units even if .debug_aranges is present: it is often the case that .debug_aranges section contains ranges only for a small subset of compile units. Test cases will be added in separate commits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168144 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/DebugInfo/DWARFContext.cpp')
-rw-r--r-- | lib/DebugInfo/DWARFContext.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/DebugInfo/DWARFContext.cpp b/lib/DebugInfo/DWARFContext.cpp index af11eed..5fa6534 100644 --- a/lib/DebugInfo/DWARFContext.cpp +++ b/lib/DebugInfo/DWARFContext.cpp @@ -91,8 +91,10 @@ const DWARFDebugAranges *DWARFContext::getDebugAranges() { Aranges.reset(new DWARFDebugAranges()); Aranges->extract(arangesData); - if (Aranges->isEmpty()) // No aranges in file, generate them from the DIEs. - Aranges->generate(this); + // Generate aranges from DIEs: even if .debug_aranges section is present, + // it may describe only a small subset of compilation units, so we need to + // manually build aranges for the rest of them. + Aranges->generate(this); return Aranges.get(); } |