diff options
author | stephenpeckham <118857872+stephenpeckham@users.noreply.github.com> | 2024-02-20 08:42:12 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-20 08:42:12 -0600 |
commit | 26db845536aa4ada6231873a01252c75637fcbae (patch) | |
tree | 09e6b6bff03cff28e256c74d0d8d623a58eeac2e /llvm/lib/Object/XCOFFObjectFile.cpp | |
parent | a1a68603145a39e6abdd35bf7a01535eb53826b1 (diff) | |
download | llvm-26db845536aa4ada6231873a01252c75637fcbae.zip llvm-26db845536aa4ada6231873a01252c75637fcbae.tar.gz llvm-26db845536aa4ada6231873a01252c75637fcbae.tar.bz2 |
[XCOFF] Support the subtype flag in DWARF section headers (#81667)
The section headers for XCOFF files have a subtype flag for Dwarf
sections. This PR updates obj2yaml, yaml2obj, and llvm-readobj so that
they recognize the subtype.
Diffstat (limited to 'llvm/lib/Object/XCOFFObjectFile.cpp')
-rw-r--r-- | llvm/lib/Object/XCOFFObjectFile.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Object/XCOFFObjectFile.cpp b/llvm/lib/Object/XCOFFObjectFile.cpp index 3fbd518..d09e7b06 100644 --- a/llvm/lib/Object/XCOFFObjectFile.cpp +++ b/llvm/lib/Object/XCOFFObjectFile.cpp @@ -65,6 +65,12 @@ template <typename T> uint16_t XCOFFSectionHeader<T>::getSectionType() const { } template <typename T> +uint32_t XCOFFSectionHeader<T>::getSectionSubtype() const { + const T &DerivedXCOFFSectionHeader = static_cast<const T &>(*this); + return DerivedXCOFFSectionHeader.Flags & ~SectionFlagsTypeMask; +} + +template <typename T> bool XCOFFSectionHeader<T>::isReservedSectionType() const { return getSectionType() & SectionFlagsReservedMask; } |