Files
clang-p2996/lldb/source/Plugins/SymbolFile/DWARF/DWARFDataExtractor.cpp
serge-sans-paille 984b800a03 Move from llvm::makeArrayRef to ArrayRef deduction guides - last part
This is a follow-up to https://reviews.llvm.org/D140896, split into
several parts as it touches a lot of files.

Differential Revision: https://reviews.llvm.org/D141298
2023-01-10 11:47:43 +01:00

30 lines
1.0 KiB
C++

//===-- DWARFDataExtractor.cpp --------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#include "DWARFDataExtractor.h"
#include "llvm/ADT/StringRef.h"
namespace lldb_private {
uint64_t
DWARFDataExtractor::GetDWARFInitialLength(lldb::offset_t *offset_ptr) const {
return GetU32(offset_ptr);
}
dw_offset_t
DWARFDataExtractor::GetDWARFOffset(lldb::offset_t *offset_ptr) const {
return GetMaxU64(offset_ptr, GetDWARFSizeOfOffset());
}
llvm::DWARFDataExtractor DWARFDataExtractor::GetAsLLVM() const {
return llvm::DWARFDataExtractor(llvm::ArrayRef(GetDataStart(), GetByteSize()),
GetByteOrder() == lldb::eByteOrderLittle,
GetAddressByteSize());
}
} // namespace lldb_private