28void ScalarBitSetTraits<XCOFF::SectionTypeFlags>::bitset(
30#define ECase(X) IO.bitSetCase(Value, #X, XCOFF::X)
47void ScalarEnumerationTraits<XCOFF::DwarfSectionSubtypeFlags>::enumeration(
49#define ECase(X) IO.enumCase(Value, #X, XCOFF::X)
62 IO.enumFallback<Hex32>(
Value);
65void ScalarEnumerationTraits<XCOFF::StorageClass>::enumeration(
67#define ECase(X) IO.enumCase(Value, #X, XCOFF::X)
121void ScalarEnumerationTraits<XCOFF::StorageMappingClass>::enumeration(
123#define ECase(X) IO.enumCase(Value, #X, XCOFF::X)
148void ScalarEnumerationTraits<XCOFF::SymbolType>::enumeration(
150#define ECase(X) IO.enumCase(Value, #X, XCOFF::X)
156 IO.enumFallback<Hex8>(
Value);
159void ScalarEnumerationTraits<XCOFFYAML::AuxSymbolType>::enumeration(
161#define ECase(X) IO.enumCase(Type, #X, XCOFFYAML::X)
172void ScalarEnumerationTraits<XCOFF::CFileStringType>::enumeration(
174#define ECase(X) IO.enumCase(Type, #X, XCOFF::X)
193 IO.mapOptional(
"MagicNumber", FileHdr.
Magic);
195 IO.mapOptional(
"CreationTime", FileHdr.
TimeStamp);
198 IO.mapOptional(
"AuxiliaryHeaderSize", FileHdr.
AuxHeaderSize);
199 IO.mapOptional(
"Flags", FileHdr.
Flags);
204 IO.mapOptional(
"Magic", AuxHdr.
Magic);
205 IO.mapOptional(
"Version", AuxHdr.
Version);
209 IO.mapOptional(
"TextSectionSize", AuxHdr.
TextSize);
211 IO.mapOptional(
"BssSectionSize", AuxHdr.
BssDataSize);
220 IO.mapOptional(
"ModuleType", AuxHdr.
CpuFlag);
230 IO.mapOptional(
"Flag", AuxHdr.
Flag);
235 IO.mapOptional(
"Address", R.VirtualAddress);
236 IO.mapOptional(
"Symbol", R.SymbolIndex);
237 IO.mapOptional(
"Info", R.Info);
238 IO.mapOptional(
"Type", R.Type);
243 MappingNormalization<NSectionFlags, uint32_t>
NC(IO, Sec.
Flags);
245 IO.mapOptional(
"Address", Sec.
Address);
246 IO.mapOptional(
"Size", Sec.
Size);
252 IO.mapOptional(
"Flags",
NC->Flags);
262 IO.mapOptional(
"SymbolType", AuxSym.
SymbolType);
282 IO.mapOptional(
"LineNum", AuxSym.
LineNum);
284 IO.mapOptional(
"LineNumHi", AuxSym.
LineNumHi);
285 IO.mapOptional(
"LineNumLo", AuxSym.
LineNumLo);
315template <
typename AuxEntT>
317 std::unique_ptr<XCOFFYAML::AuxSymbolEnt> &AuxSym) {
318 if (!IO.outputting())
319 AuxSym.reset(
new AuxEntT);
323 IO &IO, std::unique_ptr<XCOFFYAML::AuxSymbolEnt> &AuxSym) {
331 IO.mapRequired(
"Type",
AuxType);
335 IO.setError(
"an auxiliary symbol of type AUX_EXCEPT cannot be defined in "
339 ResetAuxSym<XCOFFYAML::ExcpetionAuxEnt>(IO, AuxSym);
340 auxSymMapping(IO, *cast<XCOFFYAML::ExcpetionAuxEnt>(AuxSym.get()));
343 ResetAuxSym<XCOFFYAML::FunctionAuxEnt>(IO, AuxSym);
344 auxSymMapping(IO, *cast<XCOFFYAML::FunctionAuxEnt>(AuxSym.get()), Is64);
347 ResetAuxSym<XCOFFYAML::BlockAuxEnt>(IO, AuxSym);
348 auxSymMapping(IO, *cast<XCOFFYAML::BlockAuxEnt>(AuxSym.get()), Is64);
351 ResetAuxSym<XCOFFYAML::FileAuxEnt>(IO, AuxSym);
352 auxSymMapping(IO, *cast<XCOFFYAML::FileAuxEnt>(AuxSym.get()));
355 ResetAuxSym<XCOFFYAML::CsectAuxEnt>(IO, AuxSym);
356 auxSymMapping(IO, *cast<XCOFFYAML::CsectAuxEnt>(AuxSym.get()), Is64);
359 ResetAuxSym<XCOFFYAML::SectAuxEntForDWARF>(IO, AuxSym);
360 auxSymMapping(IO, *cast<XCOFFYAML::SectAuxEntForDWARF>(AuxSym.get()));
365 "an auxiliary symbol of type AUX_STAT cannot be defined in XCOFF64");
368 ResetAuxSym<XCOFFYAML::SectAuxEntForStat>(IO, AuxSym);
369 auxSymMapping(IO, *cast<XCOFFYAML::SectAuxEntForStat>(AuxSym.get()));
376 IO.mapOptional(
"Value", S.
Value);
379 IO.mapOptional(
"Type", S.
Type);
387 IO.mapOptional(
"ContentSize", Str.ContentSize);
388 IO.mapOptional(
"Length", Str.Length);
389 IO.mapOptional(
"Strings", Str.Strings);
390 IO.mapOptional(
"RawContent", Str.RawContent);
395 IO.mapTag(
"!XCOFF",
true);
396 IO.mapRequired(
"FileHeader", Obj.
Header);
397 IO.mapOptional(
"AuxiliaryHeader", Obj.
AuxHeader);
398 IO.mapOptional(
"Sections", Obj.
Sections);
399 IO.mapOptional(
"Symbols", Obj.
Symbols);
400 IO.mapOptional(
"StringTable", Obj.
StrTbl);
401 IO.setContext(
nullptr);
COFFYAML::AuxSymbolType AuxType
The instances of the Type class are immutable: once they are created, they are never changed.
LLVM Value Representation.
@ C
The default llvm calling convention, compatible with C.
DwarfSectionSubtypeFlags
Values for defining the section subtype of sections of type STYP_DWARF as they would appear in the (s...
@ SSUBTYP_DWARNGE
DWARF aranges section.
@ SSUBTYP_DWFRAME
DWARF frame section.
@ SSUBTYP_DWABREV
DWARF abbrev section.
@ SSUBTYP_DWINFO
DWARF info section.
@ SSUBTYP_DWRNGES
DWARF ranges section.
@ SSUBTYP_DWLOC
DWARF loc section.
@ SSUBTYP_DWMAC
DWARF macinfo section.
@ SSUBTYP_DWPBNMS
DWARF pubnames section.
@ SSUBTYP_DWPBTYP
DWARF pubtypes section.
@ SSUBTYP_DWLINE
DWARF line section.
@ SSUBTYP_DWSTR
DWARF str section.
@ AUX_SECT
Identifies a SECT auxiliary entry.
@ AUX_FILE
Identifies a file auxiliary entry.
@ AUX_EXCEPT
Identifies an exception auxiliary entry.
@ AUX_FCN
Identifies a function auxiliary entry.
@ AUX_SYM
Identifies a symbol auxiliary entry.
@ AUX_CSECT
Identifies a csect auxiliary entry.
@ XFT_FN
Specifies the source-file name.
@ XFT_CD
Specifies compiler-defined information.
@ XFT_CV
Specifies the compiler version number.
@ XFT_CT
Specifies the compiler time stamp.
StorageMappingClass
Storage Mapping Class definitions.
@ XMC_TE
Symbol mapped at the end of TOC.
@ XMC_TB
Traceback Table csect.
@ XMC_TC0
TOC Anchor for TOC Addressability.
@ XMC_SV3264
Supervisor Call for both 32- and 64-bit processes.
@ XMC_GL
Global Linkage (Interfile Interface Code)
@ XMC_DS
Descriptor csect.
@ XMC_SV64
Supervisor Call for 64-bit process.
@ XMC_TL
Initialized thread-local variable.
@ XMC_RO
Read Only Constant.
@ XMC_DB
Debug Dictionary Table.
@ XMC_UA
Unclassified - Treated as Read Write.
@ XMC_SV
Supervisor Call (32-bit process only)
@ XMC_TD
Scalar data item in the TOC.
@ XMC_UC
Un-named Fortran Common.
@ XMC_UL
Uninitialized thread-local variable.
@ XMC_TI
Traceback Index csect.
@ XMC_XO
Extended Operation (Pseudo Machine Instruction)
@ XMC_BS
BSS class (uninitialized static internal)
@ XMC_TC
General TOC item.
@ XTY_CM
Common csect definition. For uninitialized storage.
@ XTY_SD
Csect definition for initialized storage.
@ XTY_LD
Label definition.
@ XTY_ER
External reference.
static void auxSymMapping(IO &IO, XCOFFYAML::CsectAuxEnt &AuxSym, bool Is64)
static void ResetAuxSym(IO &IO, std::unique_ptr< XCOFFYAML::AuxSymbolEnt > &AuxSym)
This is an optimization pass for GlobalISel generic memory operations.
std::optional< uint32_t > LineNum
std::optional< uint16_t > LineNumHi
std::optional< uint16_t > LineNumLo
std::optional< uint16_t > TypeChkSectNum
std::optional< uint32_t > ParameterHashIndex
std::optional< uint32_t > SectionOrLength
std::optional< uint32_t > SectionOrLengthHi
std::optional< uint8_t > SymbolAlignmentAndType
std::optional< uint32_t > SectionOrLengthLo
std::optional< uint8_t > SymbolAlignment
std::optional< uint16_t > StabSectNum
std::optional< XCOFF::StorageMappingClass > StorageMappingClass
std::optional< uint32_t > StabInfoIndex
std::optional< XCOFF::SymbolType > SymbolType
std::optional< int32_t > SymIdxOfNextBeyond
std::optional< uint32_t > SizeOfFunction
std::optional< uint64_t > OffsetToExceptionTbl
std::optional< XCOFF::CFileStringType > FileStringType
std::optional< StringRef > FileNameOrString
std::optional< int32_t > SymIdxOfNextBeyond
std::optional< uint32_t > OffsetToExceptionTbl
std::optional< uint64_t > PtrToLineNum
std::optional< uint32_t > SizeOfFunction
std::vector< Section > Sections
std::optional< AuxiliaryHeader > AuxHeader
std::vector< Symbol > Symbols
std::optional< uint32_t > NumberOfRelocEnt
std::optional< uint32_t > LengthOfSectionPortion
std::optional< uint16_t > NumberOfRelocEnt
std::optional< uint16_t > NumberOfLineNum
std::optional< uint32_t > SectionLength
llvm::yaml::Hex64 FileOffsetToRelocations
llvm::yaml::Hex64 Address
std::optional< XCOFF::DwarfSectionSubtypeFlags > SectionSubtype
llvm::yaml::Hex64 FileOffsetToData
yaml::BinaryRef SectionData
std::vector< Relocation > Relocations
llvm::yaml::Hex16 NumberOfLineNumbers
llvm::yaml::Hex16 NumberOfRelocations
llvm::yaml::Hex64 FileOffsetToLineNumbers
std::vector< std::unique_ptr< AuxSymbolEnt > > AuxEntries
std::optional< uint16_t > SectionIndex
std::optional< uint8_t > NumberOfAuxEntries
XCOFF::StorageClass StorageClass
std::optional< StringRef > SectionName
uint32_t denormalize(IO &)
NSectionFlags(IO &, uint32_t C)
XCOFF::SectionTypeFlags Flags