From 1f917f69ff07f09b6dbb670971f57f8efe718b84 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Thu, 14 Jul 2022 20:50:02 +0200 Subject: Vendor import of llvm-project main llvmorg-15-init-16436-g18a6ab5b8d1f. --- lldb/source/API/SBSection.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lldb/source/API/SBSection.cpp') diff --git a/lldb/source/API/SBSection.cpp b/lldb/source/API/SBSection.cpp index 733e0db0b5ba..3a9cf20e484a 100644 --- a/lldb/source/API/SBSection.cpp +++ b/lldb/source/API/SBSection.cpp @@ -242,6 +242,15 @@ uint32_t SBSection::GetTargetByteSize() { return 0; } +uint32_t SBSection::GetAlignment() { + LLDB_INSTRUMENT_VA(this); + + SectionSP section_sp(GetSP()); + if (section_sp.get()) + return (1 << section_sp->GetLog2Align()); + return 0; +} + bool SBSection::operator==(const SBSection &rhs) { LLDB_INSTRUMENT_VA(this, rhs); -- cgit v1.3