LLVM: lib/ObjectYAML/XCOFFYAML.cpp Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
16
17namespace llvm {
19
21
23
24}
25
26namespace yaml {
27
30#define ECase(X) IO.bitSetCase(Value, #X, XCOFF::X)
44#undef ECase
45}
46
49#define ECase(X) IO.enumCase(Value, #X, XCOFF::X)
61#undef ECase
63}
64
67#define ECase(X) IO.enumCase(Value, #X, XCOFF::X)
118#undef ECase
119}
120
123#define ECase(X) IO.enumCase(Value, #X, XCOFF::X)
145#undef ECase
146}
147
150#define ECase(X) IO.enumCase(Value, #X, XCOFF::X)
155#undef ECase
157}
158
161#define ECase(X) IO.enumCase(Type, #X, XCOFFYAML::X)
169#undef ECase
170}
171
174#define ECase(X) IO.enumCase(Type, #X, XCOFF::X)
179#undef ECase
180}
181
190
201
232
240
257
265 if (Is64) {
268 } else {
272 }
273}
274
279
281 if (Is64) {
283 } else {
286 }
287}
288
290 bool Is64) {
291 if (!Is64)
296}
297
303
308
314
315template
317 std::unique_ptrXCOFFYAML::AuxSymbolEnt &AuxSym) {
319 AuxSym.reset(new AuxEntT);
320}
321
323 IO &IO, std::unique_ptrXCOFFYAML::AuxSymbolEnt &AuxSym) {
324 const bool Is64 =
327
330 AuxType = AuxSym->Type;
332 switch (AuxType) {
334 if (!Is64) {
335 IO.setError("an auxiliary symbol of type AUX_EXCEPT cannot be defined in "
336 "XCOFF32");
337 return;
338 }
341 break;
345 break;
349 break;
353 break;
357 break;
361 break;
363 if (Is64) {
365 "an auxiliary symbol of type AUX_STAT cannot be defined in XCOFF64");
366 return;
367 }
370 break;
371 }
372}
373
384
392
403
404}
405}
The instances of the Type class are immutable: once they are created, they are never changed.
LLVM Value Representation.
virtual bool outputting() const =0
virtual bool mapTag(StringRef Tag, bool Default=false)=0
void mapOptional(StringRef Key, T &Val)
virtual void setError(const Twine &)=0
void * getContext() const
void enumFallback(T &Val)
void mapRequired(StringRef Key, T &Val)
@ 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)
Definition XCOFFYAML.cpp:258
static void ResetAuxSym(IO &IO, std::unique_ptr< XCOFFYAML::AuxSymbolEnt > &AuxSym)
Definition XCOFFYAML.cpp:316
This is an optimization pass for GlobalISel generic memory operations.
decltype(auto) cast(const From &Val)
cast - Return the argument parameter cast to the specified type.
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
Object()
Definition XCOFFYAML.cpp:20
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
static void mapping(IO &IO, std::unique_ptr< XCOFFYAML::AuxSymbolEnt > &AuxSym)
Definition XCOFFYAML.cpp:322
This class should be specialized by any type that needs to be converted to/from a YAML mapping.
uint32_t denormalize(IO &)
Definition XCOFFYAML.cpp:186
NSectionFlags(IO &)
Definition XCOFFYAML.cpp:183
NSectionFlags(IO &, uint32_t C)
Definition XCOFFYAML.cpp:184
XCOFF::SectionTypeFlags Flags
Definition XCOFFYAML.cpp:188
This class should be specialized by any integer type that is a union of bit values and the YAML repre...
This class should be specialized by any integral type that converts to/from a YAML scalar where there...