diff options
Diffstat (limited to 'llvm/lib/ObjCopy')
-rw-r--r-- | llvm/lib/ObjCopy/MachO/MachOObject.h | 4 | ||||
-rw-r--r-- | llvm/lib/ObjCopy/MachO/MachOWriter.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/ObjCopy/MachO/MachOObject.h b/llvm/lib/ObjCopy/MachO/MachOObject.h index 8f9444f..86c6b12 100644 --- a/llvm/lib/ObjCopy/MachO/MachOObject.h +++ b/llvm/lib/ObjCopy/MachO/MachOObject.h @@ -64,14 +64,14 @@ struct Section { return static_cast<MachO::SectionType>(Flags & MachO::SECTION_TYPE); } - bool isVirtualSection() const { + bool isBssSection() const { return (getType() == MachO::S_ZEROFILL || getType() == MachO::S_GB_ZEROFILL || getType() == MachO::S_THREAD_LOCAL_ZEROFILL); } bool hasValidOffset() const { - return !(isVirtualSection() || OriginalOffset == 0); + return !(isBssSection() || OriginalOffset == 0); } }; diff --git a/llvm/lib/ObjCopy/MachO/MachOWriter.cpp b/llvm/lib/ObjCopy/MachO/MachOWriter.cpp index 7c24d12..89c1df8 100644 --- a/llvm/lib/ObjCopy/MachO/MachOWriter.cpp +++ b/llvm/lib/ObjCopy/MachO/MachOWriter.cpp @@ -112,7 +112,7 @@ size_t MachOWriter::totalSize() const { for (const std::unique_ptr<Section> &S : LC.Sections) { if (!S->hasValidOffset()) { assert((S->Offset == 0) && "Skipped section's offset must be zero"); - assert((S->isVirtualSection() || S->Size == 0) && + assert((S->isBssSection() || S->Size == 0) && "Non-zero-fill sections with zero offset must have zero size"); continue; } @@ -240,7 +240,7 @@ void MachOWriter::writeSections() { for (const std::unique_ptr<Section> &Sec : LC.Sections) { if (!Sec->hasValidOffset()) { assert((Sec->Offset == 0) && "Skipped section's offset must be zero"); - assert((Sec->isVirtualSection() || Sec->Size == 0) && + assert((Sec->isBssSection() || Sec->Size == 0) && "Non-zero-fill sections with zero offset must have zero size"); continue; } |