use super::section::SectionEntry;
use super::segment::SegmentEntry;
pub const LLVM_SEGMENT_NAME: &str = "__LLVM";
pub const LLVM_BUNDLE_SECTION: &str = "__bundle";
pub fn llvm_segment(segments: &[SegmentEntry]) -> Option<&SegmentEntry> {
segments
.iter()
.find(|s| s.name().trim_end_matches('\0') == LLVM_SEGMENT_NAME)
}
pub fn llvm_sections<'a>(
_segments: &'a [SegmentEntry],
sections: &'a [SectionEntry],
) -> Vec<&'a SectionEntry> {
sections
.iter()
.filter(|s| s.segment_name().trim_end_matches('\0') == LLVM_SEGMENT_NAME)
.collect()
}