LLVM  6.0.0svn
DWARFDataExtractor.cpp
Go to the documentation of this file.
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 
12 
13 using namespace llvm;
14 
16  uint64_t *SecNdx) const {
17  if (SecNdx)
18  *SecNdx = -1ULL;
19  if (!Section)
20  return getUnsigned(Off, Size);
21  Optional<RelocAddrEntry> Rel = Obj->find(*Section, *Off);
22  if (!Rel)
23  return getUnsigned(Off, Size);
24  if (SecNdx)
25  *SecNdx = Rel->SectionIndex;
26  return getUnsigned(Off, Size) + Rel->Value;
27 }
Compute iterated dominance frontiers using a linear time algorithm.
Definition: AllocatorList.h:24
virtual Optional< RelocAddrEntry > find(const DWARFSection &Sec, uint64_t Pos) const =0
uint64_t getRelocatedValue(uint32_t Size, uint32_t *Off, uint64_t *SectionIndex=nullptr) const
Extracts a value and applies a relocation to the result if one exists for the given offset...
uint64_t getUnsigned(uint32_t *offset_ptr, uint32_t byte_size) const
Extract an unsigned integer of size byte_size from *offset_ptr.
constexpr char Size[]
Key for Kernel::Arg::Metadata::mSize.