diff options
Diffstat (limited to 'source/Symbol/CompactUnwindInfo.cpp')
-rw-r--r-- | source/Symbol/CompactUnwindInfo.cpp | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/source/Symbol/CompactUnwindInfo.cpp b/source/Symbol/CompactUnwindInfo.cpp index 6f0f35f278c4..3a2a4d3a09e6 100644 --- a/source/Symbol/CompactUnwindInfo.cpp +++ b/source/Symbol/CompactUnwindInfo.cpp @@ -1,9 +1,8 @@ //===-- CompactUnwindInfo.cpp -----------------------------------*- C++ -*-===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// 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 // //===----------------------------------------------------------------------===// @@ -18,10 +17,12 @@ #include "lldb/Utility/DataBufferHeap.h" #include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" -#include <algorithm> #include "llvm/Support/MathExtras.h" +#include <algorithm> +#include <memory> + using namespace lldb; using namespace lldb_private; @@ -156,9 +157,7 @@ FLAGS_ANONYMOUS_ENUM(){ llvm::countTrailingZeros(static_cast<uint32_t>(mask), llvm::ZB_Width)) & \ (((1 << llvm::countPopulation(static_cast<uint32_t>(mask)))) - 1)) -//---------------------- // constructor -//---------------------- CompactUnwindInfo::CompactUnwindInfo(ObjectFile &objfile, SectionSP §ion_sp) : m_objfile(objfile), m_section_sp(section_sp), @@ -166,9 +165,7 @@ CompactUnwindInfo::CompactUnwindInfo(ObjectFile &objfile, SectionSP §ion_sp) m_indexes_computed(eLazyBoolCalculate), m_unwindinfo_data(), m_unwindinfo_data_computed(false), m_unwind_header() {} -//---------------------- // destructor -//---------------------- CompactUnwindInfo::~CompactUnwindInfo() {} @@ -189,7 +186,7 @@ bool CompactUnwindInfo::GetUnwindPlan(Target &target, Address addr, if (log && log->GetVerbose()) { StreamString strm; addr.Dump( - &strm, NULL, + &strm, nullptr, Address::DumpStyle::DumpStyleResolvedDescriptionNoFunctionArguments, Address::DumpStyle::DumpStyleFileAddress, arch.GetAddressByteSize()); @@ -264,8 +261,8 @@ void CompactUnwindInfo::ScanIndex(const ProcessSP &process_sp) { // have a live process and can read them out of memory. if (process_sp.get() == nullptr) return; - m_section_contents_if_encrypted.reset( - new DataBufferHeap(m_section_sp->GetByteSize(), 0)); + m_section_contents_if_encrypted = + std::make_shared<DataBufferHeap>(m_section_sp->GetByteSize(), 0); Status error; if (process_sp->ReadMemory( m_section_sp->GetLoadBaseAddress(&process_sp->GetTarget()), |