/Users/buildslave/jenkins/sharedspace/clang-stage2-coverage-R@2/llvm/lib/DebugInfo/DWARF/DWARFDataExtractor.cpp
Line | Count | Source |
1 | | //===- DWARFDataExtractor.cpp ---------------------------------------------===// |
2 | | // |
3 | | // The LLVM Compiler Infrastructure |
4 | | // |
5 | | // This file is distributed under the University of Illinois Open Source |
6 | | // License. See LICENSE.TXT for details. |
7 | | // |
8 | | //===----------------------------------------------------------------------===// |
9 | | |
10 | | #include "llvm/DebugInfo/DWARF/DWARFDataExtractor.h" |
11 | | #include "llvm/DebugInfo/DWARF/DWARFContext.h" |
12 | | |
13 | | using namespace llvm; |
14 | | |
15 | | uint64_t DWARFDataExtractor::getRelocatedValue(uint32_t Size, uint32_t *Off, |
16 | 29.9k | uint64_t *SecNdx) const { |
17 | 29.9k | if (SecNdx) |
18 | 5.38k | *SecNdx = -1ULL; |
19 | 29.9k | if (!Section) |
20 | 2.19k | return getUnsigned(Off, Size); |
21 | 27.7k | Optional<RelocAddrEntry> Rel = Obj->find(*Section, *Off); |
22 | 27.7k | if (!Rel) |
23 | 23.9k | return getUnsigned(Off, Size); |
24 | 3.82k | if (3.82k SecNdx3.82k ) |
25 | 603 | *SecNdx = Rel->SectionIndex; |
26 | 29.9k | return getUnsigned(Off, Size) + Rel->Value; |
27 | 29.9k | } |