//===- lib/MC/MCSectionMachO.cpp - MachO Code Section Representation ------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #include "llvm/MC/MCSectionMachO.h" #include "llvm/MC/SectionKind.h" #include "llvm/Support/raw_ostream.h" namespace llvm { class MCAsmInfo; class MCExpr; class MCSymbol; class Triple; } // namespace llvm usingnamespacellvm; /// SectionTypeDescriptors - These are strings that describe the various section /// types. This *must* be kept in order with and stay synchronized with the /// section type list. static constexpr struct { … } SectionTypeDescriptors[MachO::LAST_KNOWN_SECTION_TYPE + 1] = …; /// SectionAttrDescriptors - This is an array of descriptors for section /// attributes. Unlike the SectionTypeDescriptors, this is not directly indexed /// by attribute, instead it is searched. static constexpr struct { … } SectionAttrDescriptors[] = …; MCSectionMachO::MCSectionMachO(StringRef Segment, StringRef Section, unsigned TAA, unsigned reserved2, SectionKind K, MCSymbol *Begin) : … { … } void MCSectionMachO::printSwitchToSection(const MCAsmInfo &MAI, const Triple &T, raw_ostream &OS, uint32_t Subsection) const { … } bool MCSectionMachO::useCodeAlign() const { … } /// ParseSectionSpecifier - Parse the section specifier indicated by "Spec". /// This is a string that can appear after a .section directive in a mach-o /// flavored .s file. If successful, this fills in the specified Out /// parameters and returns an empty string. When an invalid section /// specifier is present, this returns a string indicating the problem. Error MCSectionMachO::ParseSectionSpecifier(StringRef Spec, // In. StringRef &Segment, // Out. StringRef &Section, // Out. unsigned &TAA, // Out. bool &TAAParsed, // Out. unsigned &StubSize) { … } void MCSectionMachO::allocAtoms() { … } const MCSymbol *MCSectionMachO::getAtom(size_t I) const { … } void MCSectionMachO::setAtom(size_t I, const MCSymbol *Sym) { … }