diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2022-07-14 18:50:02 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2022-07-14 18:50:02 +0000 |
| commit | 1f917f69ff07f09b6dbb670971f57f8efe718b84 (patch) | |
| tree | 99293cbc1411737cd995dac10a99b2c40ef0944c /lldb/source/API/SBSection.cpp | |
| parent | 145449b1e420787bb99721a429341fa6be3adfb6 (diff) | |
Vendor import of llvm-project main llvmorg-15-init-16436-g18a6ab5b8d1f.vendor/llvm-project/llvmorg-15-init-16436-g18a6ab5b8d1f
Diffstat (limited to 'lldb/source/API/SBSection.cpp')
| -rw-r--r-- | lldb/source/API/SBSection.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
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); |
