36 #include <system_error>
46 template<
bool (DarwinAsmParser::*HandlerMethod)(StringRef, SMLoc)>
47 void addDirectiveHandler(
StringRef Directive) {
49 this, HandleDirective<DarwinAsmParser, HandlerMethod>);
50 getParser().addDirectiveHandler(Directive, Handler);
54 unsigned TAA = 0,
unsigned ImplicitAlign = 0,
55 unsigned StubSize = 0);
57 SMLoc LastVersionMinDirective;
60 DarwinAsmParser() =
default;
66 addDirectiveHandler<&DarwinAsmParser::parseDirectiveAltEntry>(
".alt_entry");
67 addDirectiveHandler<&DarwinAsmParser::parseDirectiveDesc>(
".desc");
68 addDirectiveHandler<&DarwinAsmParser::parseDirectiveIndirectSymbol>(
70 addDirectiveHandler<&DarwinAsmParser::parseDirectiveLsym>(
".lsym");
71 addDirectiveHandler<&DarwinAsmParser::parseDirectiveSubsectionsViaSymbols>(
72 ".subsections_via_symbols");
73 addDirectiveHandler<&DarwinAsmParser::parseDirectiveDumpOrLoad>(
".dump");
74 addDirectiveHandler<&DarwinAsmParser::parseDirectiveDumpOrLoad>(
".load");
75 addDirectiveHandler<&DarwinAsmParser::parseDirectiveSection>(
".section");
76 addDirectiveHandler<&DarwinAsmParser::parseDirectivePushSection>(
78 addDirectiveHandler<&DarwinAsmParser::parseDirectivePopSection>(
80 addDirectiveHandler<&DarwinAsmParser::parseDirectivePrevious>(
".previous");
81 addDirectiveHandler<&DarwinAsmParser::parseDirectiveSecureLogUnique>(
82 ".secure_log_unique");
83 addDirectiveHandler<&DarwinAsmParser::parseDirectiveSecureLogReset>(
85 addDirectiveHandler<&DarwinAsmParser::parseDirectiveTBSS>(
".tbss");
86 addDirectiveHandler<&DarwinAsmParser::parseDirectiveZerofill>(
".zerofill");
88 addDirectiveHandler<&DarwinAsmParser::parseDirectiveDataRegion>(
90 addDirectiveHandler<&DarwinAsmParser::parseDirectiveDataRegionEnd>(
94 addDirectiveHandler<&DarwinAsmParser::parseSectionDirectiveBss>(
".bss");
95 addDirectiveHandler<&DarwinAsmParser::parseSectionDirectiveConst>(
".const");
96 addDirectiveHandler<&DarwinAsmParser::parseSectionDirectiveConstData>(
98 addDirectiveHandler<&DarwinAsmParser::parseSectionDirectiveConstructor>(
100 addDirectiveHandler<&DarwinAsmParser::parseSectionDirectiveCString>(
102 addDirectiveHandler<&DarwinAsmParser::parseSectionDirectiveData>(
".data");
103 addDirectiveHandler<&DarwinAsmParser::parseSectionDirectiveDestructor>(
105 addDirectiveHandler<&DarwinAsmParser::parseSectionDirectiveDyld>(
".dyld");
106 addDirectiveHandler<&DarwinAsmParser::parseSectionDirectiveFVMLibInit0>(
108 addDirectiveHandler<&DarwinAsmParser::parseSectionDirectiveFVMLibInit1>(
111 &DarwinAsmParser::parseSectionDirectiveLazySymbolPointers>(
112 ".lazy_symbol_pointer");
113 addDirectiveHandler<&DarwinAsmParser::parseDirectiveLinkerOption>(
115 addDirectiveHandler<&DarwinAsmParser::parseSectionDirectiveLiteral16>(
117 addDirectiveHandler<&DarwinAsmParser::parseSectionDirectiveLiteral4>(
119 addDirectiveHandler<&DarwinAsmParser::parseSectionDirectiveLiteral8>(
121 addDirectiveHandler<&DarwinAsmParser::parseSectionDirectiveModInitFunc>(
123 addDirectiveHandler<&DarwinAsmParser::parseSectionDirectiveModTermFunc>(
126 &DarwinAsmParser::parseSectionDirectiveNonLazySymbolPointers>(
127 ".non_lazy_symbol_pointer");
129 &DarwinAsmParser::parseSectionDirectiveThreadLocalVariablePointers>(
130 ".thread_local_variable_pointer");
131 addDirectiveHandler<&DarwinAsmParser::parseSectionDirectiveObjCCatClsMeth>(
132 ".objc_cat_cls_meth");
133 addDirectiveHandler<&DarwinAsmParser::parseSectionDirectiveObjCCatInstMeth>(
134 ".objc_cat_inst_meth");
135 addDirectiveHandler<&DarwinAsmParser::parseSectionDirectiveObjCCategory>(
137 addDirectiveHandler<&DarwinAsmParser::parseSectionDirectiveObjCClass>(
139 addDirectiveHandler<&DarwinAsmParser::parseSectionDirectiveObjCClassNames>(
140 ".objc_class_names");
141 addDirectiveHandler<&DarwinAsmParser::parseSectionDirectiveObjCClassVars>(
143 addDirectiveHandler<&DarwinAsmParser::parseSectionDirectiveObjCClsMeth>(
145 addDirectiveHandler<&DarwinAsmParser::parseSectionDirectiveObjCClsRefs>(
147 addDirectiveHandler<&DarwinAsmParser::parseSectionDirectiveObjCInstMeth>(
150 &DarwinAsmParser::parseSectionDirectiveObjCInstanceVars>(
151 ".objc_instance_vars");
152 addDirectiveHandler<&DarwinAsmParser::parseSectionDirectiveObjCMessageRefs>(
153 ".objc_message_refs");
154 addDirectiveHandler<&DarwinAsmParser::parseSectionDirectiveObjCMetaClass>(
157 &DarwinAsmParser::parseSectionDirectiveObjCMethVarNames>(
158 ".objc_meth_var_names");
160 &DarwinAsmParser::parseSectionDirectiveObjCMethVarTypes>(
161 ".objc_meth_var_types");
162 addDirectiveHandler<&DarwinAsmParser::parseSectionDirectiveObjCModuleInfo>(
163 ".objc_module_info");
164 addDirectiveHandler<&DarwinAsmParser::parseSectionDirectiveObjCProtocol>(
167 &DarwinAsmParser::parseSectionDirectiveObjCSelectorStrs>(
168 ".objc_selector_strs");
170 &DarwinAsmParser::parseSectionDirectiveObjCStringObject>(
171 ".objc_string_object");
172 addDirectiveHandler<&DarwinAsmParser::parseSectionDirectiveObjCSymbols>(
174 addDirectiveHandler<&DarwinAsmParser::parseSectionDirectivePICSymbolStub>(
176 addDirectiveHandler<&DarwinAsmParser::parseSectionDirectiveStaticConst>(
178 addDirectiveHandler<&DarwinAsmParser::parseSectionDirectiveStaticData>(
180 addDirectiveHandler<&DarwinAsmParser::parseSectionDirectiveSymbolStub>(
182 addDirectiveHandler<&DarwinAsmParser::parseSectionDirectiveTData>(
".tdata");
183 addDirectiveHandler<&DarwinAsmParser::parseSectionDirectiveText>(
".text");
184 addDirectiveHandler<&DarwinAsmParser::parseSectionDirectiveThreadInitFunc>(
185 ".thread_init_func");
186 addDirectiveHandler<&DarwinAsmParser::parseSectionDirectiveTLV>(
".tlv");
188 addDirectiveHandler<&DarwinAsmParser::parseSectionDirectiveIdent>(
".ident");
189 addDirectiveHandler<&DarwinAsmParser::parseVersionMin>(
190 ".watchos_version_min");
191 addDirectiveHandler<&DarwinAsmParser::parseVersionMin>(
".tvos_version_min");
192 addDirectiveHandler<&DarwinAsmParser::parseVersionMin>(
".ios_version_min");
193 addDirectiveHandler<&DarwinAsmParser::parseVersionMin>(
194 ".macosx_version_min");
196 LastVersionMinDirective =
SMLoc();
219 return parseSectionSwitch(
"__DATA",
"__bss");
223 return parseSectionSwitch(
"__TEXT",
"__const");
227 return parseSectionSwitch(
"__TEXT",
"__static_const");
231 return parseSectionSwitch(
"__TEXT",
"__cstring",
236 return parseSectionSwitch(
"__TEXT",
"__literal4",
241 return parseSectionSwitch(
"__TEXT",
"__literal8",
246 return parseSectionSwitch(
"__TEXT",
"__literal16",
251 return parseSectionSwitch(
"__TEXT",
"__constructor");
255 return parseSectionSwitch(
"__TEXT",
"__destructor");
259 return parseSectionSwitch(
"__TEXT",
"__fvmlib_init0");
263 return parseSectionSwitch(
"__TEXT",
"__fvmlib_init1");
267 return parseSectionSwitch(
"__TEXT",
"__symbol_stub",
275 return parseSectionSwitch(
"__TEXT",
"__picsymbol_stub",
281 return parseSectionSwitch(
"__DATA",
"__data");
285 return parseSectionSwitch(
"__DATA",
"__static_data");
288 bool parseSectionDirectiveNonLazySymbolPointers(
StringRef,
SMLoc) {
289 return parseSectionSwitch(
"__DATA",
"__nl_symbol_ptr",
294 return parseSectionSwitch(
"__DATA",
"__la_symbol_ptr",
298 bool parseSectionDirectiveThreadLocalVariablePointers(
StringRef,
SMLoc) {
299 return parseSectionSwitch(
"__DATA",
"__thread_ptr",
304 return parseSectionSwitch(
"__DATA",
"__dyld");
308 return parseSectionSwitch(
"__DATA",
"__mod_init_func",
313 return parseSectionSwitch(
"__DATA",
"__mod_term_func",
318 return parseSectionSwitch(
"__DATA",
"__const");
322 return parseSectionSwitch(
"__OBJC",
"__class",
327 return parseSectionSwitch(
"__OBJC",
"__meta_class",
332 return parseSectionSwitch(
"__OBJC",
"__cat_cls_meth",
337 return parseSectionSwitch(
"__OBJC",
"__cat_inst_meth",
342 return parseSectionSwitch(
"__OBJC",
"__protocol",
347 return parseSectionSwitch(
"__OBJC",
"__string_object",
352 return parseSectionSwitch(
"__OBJC",
"__cls_meth",
357 return parseSectionSwitch(
"__OBJC",
"__inst_meth",
362 return parseSectionSwitch(
"__OBJC",
"__cls_refs",
368 return parseSectionSwitch(
"__OBJC",
"__message_refs",
374 return parseSectionSwitch(
"__OBJC",
"__symbols",
379 return parseSectionSwitch(
"__OBJC",
"__category",
384 return parseSectionSwitch(
"__OBJC",
"__class_vars",
389 return parseSectionSwitch(
"__OBJC",
"__instance_vars",
394 return parseSectionSwitch(
"__OBJC",
"__module_info",
399 return parseSectionSwitch(
"__TEXT",
"__cstring",
404 return parseSectionSwitch(
"__TEXT",
"__cstring",
409 return parseSectionSwitch(
"__TEXT",
"__cstring",
414 return parseSectionSwitch(
"__OBJC",
"__selector_strs",
419 return parseSectionSwitch(
"__DATA",
"__thread_data",
424 return parseSectionSwitch(
"__TEXT",
"__text",
429 return parseSectionSwitch(
"__DATA",
"__thread_vars",
435 getParser().eatToEndOfStatement();
440 return parseSectionSwitch(
"__DATA",
"__thread_init",
450 unsigned TAA,
unsigned Align,
453 return TokError(
"unexpected token in section switching directive");
458 getStreamer().SwitchSection(getContext().getMachOSection(
459 Segment, Section, TAA, StubSize,
471 getStreamer().EmitValueToAlignment(Align);
480 if (getParser().parseIdentifier(Name))
481 return TokError(
"expected identifier in directive");
484 MCSymbol *Sym = getContext().getOrCreateSymbol(Name);
487 return TokError(
".alt_entry must preceed symbol definition");
490 return TokError(
"unable to emit symbol attribute");
500 if (getParser().parseIdentifier(Name))
501 return TokError(
"expected identifier in directive");
504 MCSymbol *Sym = getContext().getOrCreateSymbol(Name);
507 return TokError(
"unexpected token in '.desc' directive");
511 if (getParser().parseAbsoluteExpression(DescValue))
515 return TokError(
"unexpected token in '.desc' directive");
520 getStreamer().EmitSymbolDesc(Sym, DescValue);
527 bool DarwinAsmParser::parseDirectiveIndirectSymbol(
StringRef,
SMLoc Loc) {
529 getStreamer().getCurrentSectionOnly());
535 return Error(Loc,
"indirect symbol not in a symbol pointer or stub "
539 if (getParser().parseIdentifier(Name))
540 return TokError(
"expected identifier in .indirect_symbol directive");
542 MCSymbol *Sym = getContext().getOrCreateSymbol(Name);
546 return TokError(
"non-local symbol required in directive");
549 return TokError(
"unable to emit indirect symbol attribute for: " + Name);
552 return TokError(
"unexpected token in '.indirect_symbol' directive");
561 bool DarwinAsmParser::parseDirectiveDumpOrLoad(
StringRef Directive,
563 bool IsDump = Directive ==
".dump";
565 return TokError(
"expected string in '.dump' or '.load' directive");
570 return TokError(
"unexpected token in '.dump' or '.load' directive");
577 return Warning(IDLoc,
"ignoring directive .dump for now");
579 return Warning(IDLoc,
"ignoring directive .load for now");
584 bool DarwinAsmParser::parseDirectiveLinkerOption(
StringRef IDVal,
SMLoc) {
588 return TokError(
"expected string in '" +
Twine(IDVal) +
"' directive");
591 if (getParser().parseEscapedString(Data))
600 return TokError(
"unexpected token in '" +
Twine(IDVal) +
"' directive");
604 getStreamer().EmitLinkerOptions(Args);
612 if (getParser().parseIdentifier(Name))
613 return TokError(
"expected identifier in directive");
616 MCSymbol *Sym = getContext().getOrCreateSymbol(Name);
619 return TokError(
"unexpected token in '.lsym' directive");
623 if (getParser().parseExpression(Value))
627 return TokError(
"unexpected token in '.lsym' directive");
635 return TokError(
"directive '.lsym' is unsupported");
641 SMLoc Loc = getLexer().getLoc();
644 if (getParser().parseIdentifier(SectionName))
645 return Error(Loc,
"expected identifier after '.section' directive");
649 return TokError(
"unexpected token in '.section' directive");
656 StringRef EOL = getLexer().LexUntilEndOfStatement();
657 SectionSpec.append(EOL.
begin(), EOL.
end());
661 return TokError(
"unexpected token in '.section' directive");
668 std::string ErrorStr =
670 TAA, TAAParsed, StubSize);
672 if (!ErrorStr.empty())
673 return Error(Loc, ErrorStr);
676 Triple TT = getParser().getContext().getObjectFileInfo()->getTargetTriple();
681 .Case(
"__textcoal_nt",
"__text")
682 .
Case(
"__const_coal",
"__const")
683 .
Case(
"__datacoal_nt",
"__data")
686 if (!Section.
equals(NonCoalSection)) {
688 size_t B = SectionVal.find(
',') + 1,
E = SectionVal.find(
',', B);
691 getParser().Warning(Loc,
"section \"" + Section +
"\" is deprecated",
693 getParser().Note(Loc,
"change section name to \"" + NonCoalSection +
699 bool isText = Segment ==
"__TEXT";
700 getStreamer().SwitchSection(getContext().getMachOSection(
701 Segment, Section, TAA, StubSize,
708 bool DarwinAsmParser::parseDirectivePushSection(
StringRef S,
SMLoc Loc) {
709 getStreamer().PushSection();
711 if (parseDirectiveSection(S, Loc)) {
712 getStreamer().PopSection();
721 bool DarwinAsmParser::parseDirectivePopSection(
StringRef,
SMLoc) {
722 if (!getStreamer().PopSection())
723 return TokError(
".popsection without corresponding .pushsection");
731 if (!PreviousSection.first)
732 return TokError(
".previous without corresponding .section");
733 getStreamer().SwitchSection(PreviousSection.first, PreviousSection.second);
739 bool DarwinAsmParser::parseDirectiveSecureLogUnique(
StringRef,
SMLoc IDLoc) {
740 StringRef LogMessage = getParser().parseStringToEndOfStatement();
742 return TokError(
"unexpected token in '.secure_log_unique' directive");
744 if (getContext().getSecureLogUsed())
745 return Error(IDLoc,
".secure_log_unique specified multiple times");
748 const char *SecureLogFile = getContext().getSecureLogFile();
750 return Error(IDLoc,
".secure_log_unique used but AS_SECURE_LOG_FILE "
751 "environment variable unset.");
757 auto NewOS = llvm::make_unique<raw_fd_ostream>(
760 return Error(IDLoc,
Twine(
"can't open secure log file: ") +
761 SecureLogFile +
" (" + EC.message() +
")");
763 getContext().setSecureLog(std::move(NewOS));
767 unsigned CurBuf = getSourceManager().FindBufferContainingLoc(IDLoc);
768 *OS << getSourceManager().getBufferInfo(CurBuf).Buffer->getBufferIdentifier()
769 <<
":" << getSourceManager().FindLineNumber(IDLoc, CurBuf) <<
":"
770 << LogMessage +
"\n";
772 getContext().setSecureLogUsed(
true);
779 bool DarwinAsmParser::parseDirectiveSecureLogReset(
StringRef,
SMLoc IDLoc) {
781 return TokError(
"unexpected token in '.secure_log_reset' directive");
785 getContext().setSecureLogUsed(
false);
792 bool DarwinAsmParser::parseDirectiveSubsectionsViaSymbols(
StringRef,
SMLoc) {
794 return TokError(
"unexpected token in '.subsections_via_symbols' directive");
806 SMLoc IDLoc = getLexer().getLoc();
808 if (getParser().parseIdentifier(Name))
809 return TokError(
"expected identifier in directive");
812 MCSymbol *Sym = getContext().getOrCreateSymbol(Name);
815 return TokError(
"unexpected token in directive");
819 SMLoc SizeLoc = getLexer().getLoc();
820 if (getParser().parseAbsoluteExpression(Size))
823 int64_t Pow2Alignment = 0;
824 SMLoc Pow2AlignmentLoc;
827 Pow2AlignmentLoc = getLexer().getLoc();
828 if (getParser().parseAbsoluteExpression(Pow2Alignment))
833 return TokError(
"unexpected token in '.tbss' directive");
838 return Error(SizeLoc,
"invalid '.tbss' directive size, can't be less than"
842 if (Pow2Alignment < 0)
843 return Error(Pow2AlignmentLoc,
"invalid '.tbss' alignment, can't be less"
847 return Error(IDLoc,
"invalid symbol redefinition");
849 getStreamer().EmitTBSSSymbol(getContext().getMachOSection(
850 "__DATA",
"__thread_bss",
853 Sym, Size, 1 << Pow2Alignment);
863 if (getParser().parseIdentifier(Segment))
864 return TokError(
"expected segment name after '.zerofill' directive");
867 return TokError(
"unexpected token in directive");
871 if (getParser().parseIdentifier(Section))
872 return TokError(
"expected section name after comma in '.zerofill' "
879 getStreamer().EmitZerofill(getContext().getMachOSection(
886 return TokError(
"unexpected token in directive");
889 SMLoc IDLoc = getLexer().getLoc();
891 if (getParser().parseIdentifier(IDStr))
892 return TokError(
"expected identifier in directive");
895 MCSymbol *Sym = getContext().getOrCreateSymbol(IDStr);
898 return TokError(
"unexpected token in directive");
902 SMLoc SizeLoc = getLexer().getLoc();
903 if (getParser().parseAbsoluteExpression(Size))
906 int64_t Pow2Alignment = 0;
907 SMLoc Pow2AlignmentLoc;
910 Pow2AlignmentLoc = getLexer().getLoc();
911 if (getParser().parseAbsoluteExpression(Pow2Alignment))
916 return TokError(
"unexpected token in '.zerofill' directive");
921 return Error(SizeLoc,
"invalid '.zerofill' directive size, can't be less "
927 if (Pow2Alignment < 0)
928 return Error(Pow2AlignmentLoc,
"invalid '.zerofill' directive alignment, "
929 "can't be less than zero");
932 return Error(IDLoc,
"invalid symbol redefinition");
937 getStreamer().EmitZerofill(getContext().getMachOSection(
940 Sym, Size, 1 << Pow2Alignment);
947 bool DarwinAsmParser::parseDirectiveDataRegion(
StringRef,
SMLoc) {
954 SMLoc Loc = getParser().getTok().getLoc();
955 if (getParser().parseIdentifier(RegionType))
956 return TokError(
"expected region type after '.data_region' directive");
963 return Error(Loc,
"unknown region type in '.data_region' directive");
972 bool DarwinAsmParser::parseDirectiveDataRegionEnd(
StringRef,
SMLoc) {
974 return TokError(
"unexpected token in '.end_data_region' directive");
984 bool DarwinAsmParser::parseVersionMin(
StringRef Directive,
SMLoc Loc) {
985 int64_t Major = 0, Minor = 0, Update = 0;
993 return TokError(
"invalid OS major version number");
994 Major = getLexer().getTok().getIntVal();
995 if (Major > 65535 || Major <= 0)
996 return TokError(
"invalid OS major version number");
999 return TokError(
"minor OS version number required, comma expected");
1003 return TokError(
"invalid OS minor version number");
1004 Minor = getLexer().getTok().getIntVal();
1005 if (Minor > 255 || Minor < 0)
1006 return TokError(
"invalid OS minor version number");
1011 return TokError(
"invalid update specifier, comma expected");
1014 return TokError(
"invalid OS update number");
1015 Update = getLexer().getTok().getIntVal();
1016 if (Update > 255 || Update < 0)
1017 return TokError(
"invalid OS update number");
1021 const Triple &
T = getContext().getObjectFileInfo()->getTargetTriple();
1029 if (T.
getOS() != ExpectedOS)
1030 Warning(Loc, Directive +
" should only be used for " +
1033 if (LastVersionMinDirective.isValid()) {
1034 Warning(Loc,
"overriding previous version_min directive");
1035 Note(LastVersionMinDirective,
"previous definition is here");
1037 LastVersionMinDirective = Loc;
1040 getStreamer().EmitVersionMin((
MCVersionMinType)Kind, Major, Minor, Update);
1048 return new DarwinAsmParser;
OSType getOS() const
getOS - Get the parsed operating system type of this triple.
Represents a range in source code.
void push_back(const T &Elt)
F_Append - When opening a file, if it already exists append to the existing file instead of returning...
static SectionKind getData()
S_NON_LAZY_SYMBOL_POINTERS - Section with non-lazy symbol pointers.
S_SYMBOL_STUBS - Section with symbol stubs, byte size of stub in the Reserved2 field.
This represents a section on a Mach-O system (used by Mac OS X).
const char * getPointer() const
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Generic assembler parser interface, for use by target specific assembly parsers.
virtual void Initialize(MCAsmParser &Parser)
Initialize the extension for parsing using the given Parser.
MCAsmParserExtension * createDarwinAsmParser()
S_THREAD_LOCAL_VARIABLES - Section with thread local variable structure data.
S_4BYTE_LITERALS - Section with 4 byte literals.
static SectionKind getBSS()
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Base class for the full range of assembler expressions which are needed for parsing.
LLVM_ATTRIBUTE_ALWAYS_INLINE R Default(const T &Value) const
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE bool equals(StringRef RHS) const
equals - Check for string equality, this is more efficient than compare() when the relative ordering ...
S_8BYTE_LITERALS - Section with 8 byte literals.
S_MOD_TERM_FUNC_POINTERS - Section with only function pointers for termination.
LLVM_ATTRIBUTE_ALWAYS_INLINE StringSwitch & Case(const char(&S)[N], const T &Value)
ArchType getArch() const
getArch - Get the parsed architecture type of this triple.
static StringRef getOSTypeName(OSType Kind)
getOSTypeName - Get the canonical name for the Kind operating system.
S_ATTR_NO_DEAD_STRIP - No dead stripping.
A switch()-like statement whose cases are string literals.
S_LITERAL_POINTERS - Section with pointers to literals.
static std::string ParseSectionSpecifier(StringRef Spec, StringRef &Segment, StringRef &Section, unsigned &TAA, bool &TAAParsed, unsigned &StubSize)
Parse the section specifier indicated by "Spec".
S_THREAD_LOCAL_ZEROFILL - Thread local zerofill section.
constexpr char Args[]
Key for Kernel::Metadata::mArgs.
.subsections_via_symbols (MachO)
S_THREAD_LOCAL_REGULAR - Thread local data section.
S_CSTRING_LITERALS - Section with literal C strings.
Triple - Helper class for working with autoconf configuration names.
S_LAZY_SYMBOL_POINTERS - Section with lazy symbol pointers.
static SectionKind getThreadBSS()
std::pair< MCSection *, const MCExpr * > MCSectionSubPair
S_THREAD_LOCAL_VARIABLE_POINTERS - Section with pointers to thread local structures.
MachO::SectionType getType() const
bool isDefined(bool SetUsed=true) const
isDefined - Check if this symbol is defined (i.e., it has an address).
S_THREAD_LOCAL_INIT_FUNCTION_POINTERS - Section with thread local variable initialization pointers to...
S_16BYTE_LITERALS - Section with only 16 byte literals.
bool isTemporary() const
isTemporary - Check if this is an assembler temporary symbol.
The file should be opened in text mode on platforms that make this distinction.
constexpr char Size[]
Key for Kernel::Arg::Metadata::mSize.
static SMLoc getFromPointer(const char *Ptr)
A raw_ostream that writes to a file descriptor.
constexpr char Align[]
Key for Kernel::Arg::Metadata::mAlign.
Generic interface for extending the MCAsmParser, which is implemented by target and object file assem...
std::string DirName(const std::string &FileName)
LLVM Value Representation.
std::pair< MCAsmParserExtension *, DirectiveHandler > ExtensionDirectiveHandler
StringRef - Represent a constant reference to a string, i.e.
S_ZEROFILL - Zero fill on demand section.
S_ATTR_PURE_INSTRUCTIONS - Section contains only true machine instructions.
Represents a location in source code.
S_MOD_INIT_FUNC_POINTERS - Section with only function pointers for initialization.
SectionType
These are the section type and attributes fields.
bool isUndefined(bool SetUsed=true) const
isUndefined - Check if this symbol undefined (i.e., implicitly defined).
static SectionKind getText()