LLVM  5.0.0
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 
11 
12 using namespace llvm;
13 
15  uint64_t *SecNdx) const {
16  if (!RelocMap)
17  return getUnsigned(Off, Size);
18  RelocAddrMap::const_iterator AI = RelocMap->find(*Off);
19  if (AI == RelocMap->end())
20  return getUnsigned(Off, Size);
21  if (SecNdx)
22  *SecNdx = AI->second.SectionIndex;
23  return getUnsigned(Off, Size) + AI->second.Value;
24 }
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...
iterator find(const_arg_type_t< KeyT > Val)
Definition: DenseMap.h:131
constexpr char Size[]
Key for Kernel::Arg::Metadata::mSize.
iterator end()
Definition: DenseMap.h:73
uint64_t getUnsigned(uint32_t *offset_ptr, uint32_t byte_size) const
Extract an unsigned integer of size byte_size from *offset_ptr.