Coverage Report

Created: 2022-01-18 06:27

/Users/buildslave/jenkins/workspace/coverage/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDataExtractor.cpp
Line
Count
Source
1
//===-- DWARFDataExtractor.cpp --------------------------------------------===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
9
#include "DWARFDataExtractor.h"
10
#include "llvm/ADT/StringRef.h"
11
12
namespace lldb_private {
13
14
uint64_t
15
29.5k
DWARFDataExtractor::GetDWARFInitialLength(lldb::offset_t *offset_ptr) const {
16
29.5k
  return GetU32(offset_ptr);
17
29.5k
}
18
19
dw_offset_t
20
29.5k
DWARFDataExtractor::GetDWARFOffset(lldb::offset_t *offset_ptr) const {
21
29.5k
  return GetMaxU64(offset_ptr, GetDWARFSizeOfOffset());
22
29.5k
}
23
24
8.43k
llvm::DWARFDataExtractor DWARFDataExtractor::GetAsLLVM() const {
25
8.43k
  return llvm::DWARFDataExtractor(
26
8.43k
      llvm::makeArrayRef(GetDataStart(), GetByteSize()),
27
8.43k
      GetByteOrder() == lldb::eByteOrderLittle, GetAddressByteSize());
28
8.43k
}
29
} // namespace lldb_private