//===- EnumTables.cpp - Enum to string conversion tables ------------------===// // // 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/DebugInfo/CodeView/EnumTables.h" #include "llvm/Support/ScopedPrinter.h" #include using namespace llvm; using namespace codeview; #define CV_ENUM_CLASS_ENT(enum_class, enum) \ { #enum, std::underlying_type_t(enum_class::enum) } #define CV_ENUM_ENT(ns, enum) \ { #enum, ns::enum } static const EnumEntry SymbolTypeNames[] = { #define CV_SYMBOL(enum, val) {#enum, enum}, #include "llvm/DebugInfo/CodeView/CodeViewSymbols.def" #undef CV_SYMBOL }; static const EnumEntry TypeLeafNames[] = { #define CV_TYPE(name, val) {#name, name}, #include "llvm/DebugInfo/CodeView/CodeViewTypes.def" #undef CV_TYPE }; static const EnumEntry RegisterNames_X86[] = { #define CV_REGISTERS_X86 #define CV_REGISTER(name, val) CV_ENUM_CLASS_ENT(RegisterId, name), #include "llvm/DebugInfo/CodeView/CodeViewRegisters.def" #undef CV_REGISTER #undef CV_REGISTERS_X86 }; static const EnumEntry RegisterNames_ARM[] = { #define CV_REGISTERS_ARM #define CV_REGISTER(name, val) CV_ENUM_CLASS_ENT(RegisterId, name), #include "llvm/DebugInfo/CodeView/CodeViewRegisters.def" #undef CV_REGISTER #undef CV_REGISTERS_ARM }; static const EnumEntry RegisterNames_ARM64[] = { #define CV_REGISTERS_ARM64 #define CV_REGISTER(name, val) CV_ENUM_CLASS_ENT(RegisterId, name), #include "llvm/DebugInfo/CodeView/CodeViewRegisters.def" #undef CV_REGISTER #undef CV_REGISTERS_ARM64 }; static const EnumEntry PublicSymFlagNames[] = { CV_ENUM_CLASS_ENT(PublicSymFlags, Code), CV_ENUM_CLASS_ENT(PublicSymFlags, Function), CV_ENUM_CLASS_ENT(PublicSymFlags, Managed), CV_ENUM_CLASS_ENT(PublicSymFlags, MSIL), }; static const EnumEntry ProcSymFlagNames[] = { CV_ENUM_CLASS_ENT(ProcSymFlags, HasFP), CV_ENUM_CLASS_ENT(ProcSymFlags, HasIRET), CV_ENUM_CLASS_ENT(ProcSymFlags, HasFRET), CV_ENUM_CLASS_ENT(ProcSymFlags, IsNoReturn), CV_ENUM_CLASS_ENT(ProcSymFlags, IsUnreachable), CV_ENUM_CLASS_ENT(ProcSymFlags, HasCustomCallingConv), CV_ENUM_CLASS_ENT(ProcSymFlags, IsNoInline), CV_ENUM_CLASS_ENT(ProcSymFlags, HasOptimizedDebugInfo), }; static const EnumEntry LocalFlags[] = { CV_ENUM_CLASS_ENT(LocalSymFlags, IsParameter), CV_ENUM_CLASS_ENT(LocalSymFlags, IsAddressTaken), CV_ENUM_CLASS_ENT(LocalSymFlags, IsCompilerGenerated), CV_ENUM_CLASS_ENT(LocalSymFlags, IsAggregate), CV_ENUM_CLASS_ENT(LocalSymFlags, IsAggregated), CV_ENUM_CLASS_ENT(LocalSymFlags, IsAliased), CV_ENUM_CLASS_ENT(LocalSymFlags, IsAlias), CV_ENUM_CLASS_ENT(LocalSymFlags, IsReturnValue), CV_ENUM_CLASS_ENT(LocalSymFlags, IsOptimizedOut), CV_ENUM_CLASS_ENT(LocalSymFlags, IsEnregisteredGlobal), CV_ENUM_CLASS_ENT(LocalSymFlags, IsEnregisteredStatic), }; static const EnumEntry FrameCookieKinds[] = { CV_ENUM_CLASS_ENT(FrameCookieKind, Copy), CV_ENUM_CLASS_ENT(FrameCookieKind, XorStackPointer), CV_ENUM_CLASS_ENT(FrameCookieKind, XorFramePointer), CV_ENUM_CLASS_ENT(FrameCookieKind, XorR13), }; static const EnumEntry SourceLanguages[] = { CV_ENUM_ENT(SourceLanguage, C), CV_ENUM_ENT(SourceLanguage, Cpp), CV_ENUM_ENT(SourceLanguage, Fortran), CV_ENUM_ENT(SourceLanguage, Masm), CV_ENUM_ENT(SourceLanguage, Pascal), CV_ENUM_ENT(SourceLanguage, Basic), CV_ENUM_ENT(SourceLanguage, Cobol), CV_ENUM_ENT(SourceLanguage, Link), CV_ENUM_ENT(SourceLanguage, Cvtres), CV_ENUM_ENT(SourceLanguage, Cvtpgd), CV_ENUM_ENT(SourceLanguage, CSharp), CV_ENUM_ENT(SourceLanguage, VB), CV_ENUM_ENT(SourceLanguage, ILAsm), CV_ENUM_ENT(SourceLanguage, Java), CV_ENUM_ENT(SourceLanguage, JScript), CV_ENUM_ENT(SourceLanguage, MSIL), CV_ENUM_ENT(SourceLanguage, HLSL), CV_ENUM_ENT(SourceLanguage, D), CV_ENUM_ENT(SourceLanguage, Swift), CV_ENUM_ENT(SourceLanguage, Rust), CV_ENUM_ENT(SourceLanguage, ObjC), CV_ENUM_ENT(SourceLanguage, ObjCpp), CV_ENUM_ENT(SourceLanguage, AliasObj), CV_ENUM_ENT(SourceLanguage, Go), {"Swift", SourceLanguage::OldSwift}, }; static const EnumEntry CompileSym2FlagNames[] = { CV_ENUM_CLASS_ENT(CompileSym2Flags, EC), CV_ENUM_CLASS_ENT(CompileSym2Flags, NoDbgInfo), CV_ENUM_CLASS_ENT(CompileSym2Flags, LTCG), CV_ENUM_CLASS_ENT(CompileSym2Flags, NoDataAlign), CV_ENUM_CLASS_ENT(CompileSym2Flags, ManagedPresent), CV_ENUM_CLASS_ENT(CompileSym2Flags, SecurityChecks), CV_ENUM_CLASS_ENT(CompileSym2Flags, HotPatch), CV_ENUM_CLASS_ENT(CompileSym2Flags, CVTCIL), CV_ENUM_CLASS_ENT(CompileSym2Flags, MSILModule), }; static const EnumEntry CompileSym3FlagNames[] = { CV_ENUM_CLASS_ENT(CompileSym3Flags, EC), CV_ENUM_CLASS_ENT(CompileSym3Flags, NoDbgInfo), CV_ENUM_CLASS_ENT(CompileSym3Flags, LTCG), CV_ENUM_CLASS_ENT(CompileSym3Flags, NoDataAlign), CV_ENUM_CLASS_ENT(CompileSym3Flags, ManagedPresent), CV_ENUM_CLASS_ENT(CompileSym3Flags, SecurityChecks), CV_ENUM_CLASS_ENT(CompileSym3Flags, HotPatch), CV_ENUM_CLASS_ENT(CompileSym3Flags, CVTCIL), CV_ENUM_CLASS_ENT(CompileSym3Flags, MSILModule), CV_ENUM_CLASS_ENT(CompileSym3Flags, Sdl), CV_ENUM_CLASS_ENT(CompileSym3Flags, PGO), CV_ENUM_CLASS_ENT(CompileSym3Flags, Exp), }; static const EnumEntry FileChecksumNames[] = { CV_ENUM_CLASS_ENT(FileChecksumKind, None), CV_ENUM_CLASS_ENT(FileChecksumKind, MD5), CV_ENUM_CLASS_ENT(FileChecksumKind, SHA1), CV_ENUM_CLASS_ENT(FileChecksumKind, SHA256), }; static const EnumEntry CPUTypeNames[] = { CV_ENUM_CLASS_ENT(CPUType, Intel8080), CV_ENUM_CLASS_ENT(CPUType, Intel8086), CV_ENUM_CLASS_ENT(CPUType, Intel80286), CV_ENUM_CLASS_ENT(CPUType, Intel80386), CV_ENUM_CLASS_ENT(CPUType, Intel80486), CV_ENUM_CLASS_ENT(CPUType, Pentium), CV_ENUM_CLASS_ENT(CPUType, PentiumPro), CV_ENUM_CLASS_ENT(CPUType, Pentium3), CV_ENUM_CLASS_ENT(CPUType, MIPS), CV_ENUM_CLASS_ENT(CPUType, MIPS16), CV_ENUM_CLASS_ENT(CPUType, MIPS32), CV_ENUM_CLASS_ENT(CPUType, MIPS64), CV_ENUM_CLASS_ENT(CPUType, MIPSI), CV_ENUM_CLASS_ENT(CPUType, MIPSII), CV_ENUM_CLASS_ENT(CPUType, MIPSIII), CV_ENUM_CLASS_ENT(CPUType, MIPSIV), CV_ENUM_CLASS_ENT(CPUType, MIPSV), CV_ENUM_CLASS_ENT(CPUType, M68000), CV_ENUM_CLASS_ENT(CPUType, M68010), CV_ENUM_CLASS_ENT(CPUType, M68020), CV_ENUM_CLASS_ENT(CPUType, M68030), CV_ENUM_CLASS_ENT(CPUType, M68040), CV_ENUM_CLASS_ENT(CPUType, Alpha), CV_ENUM_CLASS_ENT(CPUType, Alpha21164), CV_ENUM_CLASS_ENT(CPUType, Alpha21164A), CV_ENUM_CLASS_ENT(CPUType, Alpha21264), CV_ENUM_CLASS_ENT(CPUType, Alpha21364), CV_ENUM_CLASS_ENT(CPUType, PPC601), CV_ENUM_CLASS_ENT(CPUType, PPC603), CV_ENUM_CLASS_ENT(CPUType, PPC604), CV_ENUM_CLASS_ENT(CPUType, PPC620), CV_ENUM_CLASS_ENT(CPUType, PPCFP), CV_ENUM_CLASS_ENT(CPUType, PPCBE), CV_ENUM_CLASS_ENT(CPUType, SH3), CV_ENUM_CLASS_ENT(CPUType, SH3E), CV_ENUM_CLASS_ENT(CPUType, SH3DSP), CV_ENUM_CLASS_ENT(CPUType, SH4), CV_ENUM_CLASS_ENT(CPUType, SHMedia), CV_ENUM_CLASS_ENT(CPUType, ARM3), CV_ENUM_CLASS_ENT(CPUType, ARM4), CV_ENUM_CLASS_ENT(CPUType, ARM4T), CV_ENUM_CLASS_ENT(CPUType, ARM5), CV_ENUM_CLASS_ENT(CPUType, ARM5T), CV_ENUM_CLASS_ENT(CPUType, ARM6), CV_ENUM_CLASS_ENT(CPUType, ARM_XMAC), CV_ENUM_CLASS_ENT(CPUType, ARM_WMMX), CV_ENUM_CLASS_ENT(CPUType, ARM7), CV_ENUM_CLASS_ENT(CPUType, Omni), CV_ENUM_CLASS_ENT(CPUType, Ia64), CV_ENUM_CLASS_ENT(CPUType, Ia64_2), CV_ENUM_CLASS_ENT(CPUType, CEE), CV_ENUM_CLASS_ENT(CPUType, AM33), CV_ENUM_CLASS_ENT(CPUType, M32R), CV_ENUM_CLASS_ENT(CPUType, TriCore), CV_ENUM_CLASS_ENT(CPUType, X64), CV_ENUM_CLASS_ENT(CPUType, EBC), CV_ENUM_CLASS_ENT(CPUType, Thumb), CV_ENUM_CLASS_ENT(CPUType, ARMNT), CV_ENUM_CLASS_ENT(CPUType, ARM64), CV_ENUM_CLASS_ENT(CPUType, HybridX86ARM64), CV_ENUM_CLASS_ENT(CPUType, ARM64EC), CV_ENUM_CLASS_ENT(CPUType, ARM64X), CV_ENUM_CLASS_ENT(CPUType, Unknown), CV_ENUM_CLASS_ENT(CPUType, D3D11_Shader), }; static const EnumEntry FrameProcSymFlagNames[] = { CV_ENUM_CLASS_ENT(FrameProcedureOptions, HasAlloca), CV_ENUM_CLASS_ENT(FrameProcedureOptions, HasSetJmp), CV_ENUM_CLASS_ENT(FrameProcedureOptions, HasLongJmp), CV_ENUM_CLASS_ENT(FrameProcedureOptions, HasInlineAssembly), CV_ENUM_CLASS_ENT(FrameProcedureOptions, HasExceptionHandling), CV_ENUM_CLASS_ENT(FrameProcedureOptions, MarkedInline), CV_ENUM_CLASS_ENT(FrameProcedureOptions, HasStructuredExceptionHandling), CV_ENUM_CLASS_ENT(FrameProcedureOptions, Naked), CV_ENUM_CLASS_ENT(FrameProcedureOptions, SecurityChecks), CV_ENUM_CLASS_ENT(FrameProcedureOptions, AsynchronousExceptionHandling), CV_ENUM_CLASS_ENT(FrameProcedureOptions, NoStackOrderingForSecurityChecks), CV_ENUM_CLASS_ENT(FrameProcedureOptions, Inlined), CV_ENUM_CLASS_ENT(FrameProcedureOptions, StrictSecurityChecks), CV_ENUM_CLASS_ENT(FrameProcedureOptions, SafeBuffers), CV_ENUM_CLASS_ENT(FrameProcedureOptions, EncodedLocalBasePointerMask), CV_ENUM_CLASS_ENT(FrameProcedureOptions, EncodedParamBasePointerMask), CV_ENUM_CLASS_ENT(FrameProcedureOptions, ProfileGuidedOptimization), CV_ENUM_CLASS_ENT(FrameProcedureOptions, ValidProfileCounts), CV_ENUM_CLASS_ENT(FrameProcedureOptions, OptimizedForSpeed), CV_ENUM_CLASS_ENT(FrameProcedureOptions, GuardCfg), CV_ENUM_CLASS_ENT(FrameProcedureOptions, GuardCfw), }; static const EnumEntry ModuleSubstreamKindNames[] = { CV_ENUM_CLASS_ENT(DebugSubsectionKind, None), CV_ENUM_CLASS_ENT(DebugSubsectionKind, Symbols), CV_ENUM_CLASS_ENT(DebugSubsectionKind, Lines), CV_ENUM_CLASS_ENT(DebugSubsectionKind, StringTable), CV_ENUM_CLASS_ENT(DebugSubsectionKind, FileChecksums), CV_ENUM_CLASS_ENT(DebugSubsectionKind, FrameData), CV_ENUM_CLASS_ENT(DebugSubsectionKind, InlineeLines), CV_ENUM_CLASS_ENT(DebugSubsectionKind, CrossScopeImports), CV_ENUM_CLASS_ENT(DebugSubsectionKind, CrossScopeExports), CV_ENUM_CLASS_ENT(DebugSubsectionKind, ILLines), CV_ENUM_CLASS_ENT(DebugSubsectionKind, FuncMDTokenMap), CV_ENUM_CLASS_ENT(DebugSubsectionKind, TypeMDTokenMap), CV_ENUM_CLASS_ENT(DebugSubsectionKind, MergedAssemblyInput), CV_ENUM_CLASS_ENT(DebugSubsectionKind, CoffSymbolRVA), }; static const EnumEntry ExportSymFlagNames[] = { CV_ENUM_CLASS_ENT(ExportFlags, IsConstant), CV_ENUM_CLASS_ENT(ExportFlags, IsData), CV_ENUM_CLASS_ENT(ExportFlags, IsPrivate), CV_ENUM_CLASS_ENT(ExportFlags, HasNoName), CV_ENUM_CLASS_ENT(ExportFlags, HasExplicitOrdinal), CV_ENUM_CLASS_ENT(ExportFlags, IsForwarder), }; static const EnumEntry ThunkOrdinalNames[] = { CV_ENUM_CLASS_ENT(ThunkOrdinal, Standard), CV_ENUM_CLASS_ENT(ThunkOrdinal, ThisAdjustor), CV_ENUM_CLASS_ENT(ThunkOrdinal, Vcall), CV_ENUM_CLASS_ENT(ThunkOrdinal, Pcode), CV_ENUM_CLASS_ENT(ThunkOrdinal, UnknownLoad), CV_ENUM_CLASS_ENT(ThunkOrdinal, TrampIncremental), CV_ENUM_CLASS_ENT(ThunkOrdinal, BranchIsland), }; static const EnumEntry TrampolineNames[] = { CV_ENUM_CLASS_ENT(TrampolineType, TrampIncremental), CV_ENUM_CLASS_ENT(TrampolineType, BranchIsland), }; static const EnumEntry ImageSectionCharacteristicNames[] = { CV_ENUM_ENT(COFF, IMAGE_SCN_TYPE_NOLOAD), CV_ENUM_ENT(COFF, IMAGE_SCN_TYPE_NO_PAD), CV_ENUM_ENT(COFF, IMAGE_SCN_CNT_CODE), CV_ENUM_ENT(COFF, IMAGE_SCN_CNT_INITIALIZED_DATA), CV_ENUM_ENT(COFF, IMAGE_SCN_CNT_UNINITIALIZED_DATA), CV_ENUM_ENT(COFF, IMAGE_SCN_LNK_OTHER), CV_ENUM_ENT(COFF, IMAGE_SCN_LNK_INFO), CV_ENUM_ENT(COFF, IMAGE_SCN_LNK_REMOVE), CV_ENUM_ENT(COFF, IMAGE_SCN_LNK_COMDAT), CV_ENUM_ENT(COFF, IMAGE_SCN_GPREL), CV_ENUM_ENT(COFF, IMAGE_SCN_MEM_PURGEABLE), CV_ENUM_ENT(COFF, IMAGE_SCN_MEM_16BIT), CV_ENUM_ENT(COFF, IMAGE_SCN_MEM_LOCKED), CV_ENUM_ENT(COFF, IMAGE_SCN_MEM_PRELOAD), CV_ENUM_ENT(COFF, IMAGE_SCN_ALIGN_1BYTES), CV_ENUM_ENT(COFF, IMAGE_SCN_ALIGN_2BYTES), CV_ENUM_ENT(COFF, IMAGE_SCN_ALIGN_4BYTES), CV_ENUM_ENT(COFF, IMAGE_SCN_ALIGN_8BYTES), CV_ENUM_ENT(COFF, IMAGE_SCN_ALIGN_16BYTES), CV_ENUM_ENT(COFF, IMAGE_SCN_ALIGN_32BYTES), CV_ENUM_ENT(COFF, IMAGE_SCN_ALIGN_64BYTES), CV_ENUM_ENT(COFF, IMAGE_SCN_ALIGN_128BYTES), CV_ENUM_ENT(COFF, IMAGE_SCN_ALIGN_256BYTES), CV_ENUM_ENT(COFF, IMAGE_SCN_ALIGN_512BYTES), CV_ENUM_ENT(COFF, IMAGE_SCN_ALIGN_1024BYTES), CV_ENUM_ENT(COFF, IMAGE_SCN_ALIGN_2048BYTES), CV_ENUM_ENT(COFF, IMAGE_SCN_ALIGN_4096BYTES), CV_ENUM_ENT(COFF, IMAGE_SCN_ALIGN_8192BYTES), CV_ENUM_ENT(COFF, IMAGE_SCN_LNK_NRELOC_OVFL), CV_ENUM_ENT(COFF, IMAGE_SCN_MEM_DISCARDABLE), CV_ENUM_ENT(COFF, IMAGE_SCN_MEM_NOT_CACHED), CV_ENUM_ENT(COFF, IMAGE_SCN_MEM_NOT_PAGED), CV_ENUM_ENT(COFF, IMAGE_SCN_MEM_SHARED), CV_ENUM_ENT(COFF, IMAGE_SCN_MEM_EXECUTE), CV_ENUM_ENT(COFF, IMAGE_SCN_MEM_READ), CV_ENUM_ENT(COFF, IMAGE_SCN_MEM_WRITE)}; static const EnumEntry ClassOptionNames[] = { CV_ENUM_CLASS_ENT(ClassOptions, Packed), CV_ENUM_CLASS_ENT(ClassOptions, HasConstructorOrDestructor), CV_ENUM_CLASS_ENT(ClassOptions, HasOverloadedOperator), CV_ENUM_CLASS_ENT(ClassOptions, Nested), CV_ENUM_CLASS_ENT(ClassOptions, ContainsNestedClass), CV_ENUM_CLASS_ENT(ClassOptions, HasOverloadedAssignmentOperator), CV_ENUM_CLASS_ENT(ClassOptions, HasConversionOperator), CV_ENUM_CLASS_ENT(ClassOptions, ForwardReference), CV_ENUM_CLASS_ENT(ClassOptions, Scoped), CV_ENUM_CLASS_ENT(ClassOptions, HasUniqueName), CV_ENUM_CLASS_ENT(ClassOptions, Sealed), CV_ENUM_CLASS_ENT(ClassOptions, Intrinsic), }; static const EnumEntry MemberAccessNames[] = { CV_ENUM_CLASS_ENT(MemberAccess, None), CV_ENUM_CLASS_ENT(MemberAccess, Private), CV_ENUM_CLASS_ENT(MemberAccess, Protected), CV_ENUM_CLASS_ENT(MemberAccess, Public), }; static const EnumEntry MethodOptionNames[] = { CV_ENUM_CLASS_ENT(MethodOptions, Pseudo), CV_ENUM_CLASS_ENT(MethodOptions, NoInherit), CV_ENUM_CLASS_ENT(MethodOptions, NoConstruct), CV_ENUM_CLASS_ENT(MethodOptions, CompilerGenerated), CV_ENUM_CLASS_ENT(MethodOptions, Sealed), }; static const EnumEntry MemberKindNames[] = { CV_ENUM_CLASS_ENT(MethodKind, Vanilla), CV_ENUM_CLASS_ENT(MethodKind, Virtual), CV_ENUM_CLASS_ENT(MethodKind, Static), CV_ENUM_CLASS_ENT(MethodKind, Friend), CV_ENUM_CLASS_ENT(MethodKind, IntroducingVirtual), CV_ENUM_CLASS_ENT(MethodKind, PureVirtual), CV_ENUM_CLASS_ENT(MethodKind, PureIntroducingVirtual), }; static const EnumEntry PtrKindNames[] = { CV_ENUM_CLASS_ENT(PointerKind, Near16), CV_ENUM_CLASS_ENT(PointerKind, Far16), CV_ENUM_CLASS_ENT(PointerKind, Huge16), CV_ENUM_CLASS_ENT(PointerKind, BasedOnSegment), CV_ENUM_CLASS_ENT(PointerKind, BasedOnValue), CV_ENUM_CLASS_ENT(PointerKind, BasedOnSegmentValue), CV_ENUM_CLASS_ENT(PointerKind, BasedOnAddress), CV_ENUM_CLASS_ENT(PointerKind, BasedOnSegmentAddress), CV_ENUM_CLASS_ENT(PointerKind, BasedOnType), CV_ENUM_CLASS_ENT(PointerKind, BasedOnSelf), CV_ENUM_CLASS_ENT(PointerKind, Near32), CV_ENUM_CLASS_ENT(PointerKind, Far32), CV_ENUM_CLASS_ENT(PointerKind, Near64), }; static const EnumEntry PtrModeNames[] = { CV_ENUM_CLASS_ENT(PointerMode, Pointer), CV_ENUM_CLASS_ENT(PointerMode, LValueReference), CV_ENUM_CLASS_ENT(PointerMode, PointerToDataMember), CV_ENUM_CLASS_ENT(PointerMode, PointerToMemberFunction), CV_ENUM_CLASS_ENT(PointerMode, RValueReference), }; static const EnumEntry PtrMemberRepNames[] = { CV_ENUM_CLASS_ENT(PointerToMemberRepresentation, Unknown), CV_ENUM_CLASS_ENT(PointerToMemberRepresentation, SingleInheritanceData), CV_ENUM_CLASS_ENT(PointerToMemberRepresentation, MultipleInheritanceData), CV_ENUM_CLASS_ENT(PointerToMemberRepresentation, VirtualInheritanceData), CV_ENUM_CLASS_ENT(PointerToMemberRepresentation, GeneralData), CV_ENUM_CLASS_ENT(PointerToMemberRepresentation, SingleInheritanceFunction), CV_ENUM_CLASS_ENT(PointerToMemberRepresentation, MultipleInheritanceFunction), CV_ENUM_CLASS_ENT(PointerToMemberRepresentation, VirtualInheritanceFunction), CV_ENUM_CLASS_ENT(PointerToMemberRepresentation, GeneralFunction), }; static const EnumEntry TypeModifierNames[] = { CV_ENUM_CLASS_ENT(ModifierOptions, Const), CV_ENUM_CLASS_ENT(ModifierOptions, Volatile), CV_ENUM_CLASS_ENT(ModifierOptions, Unaligned), }; static const EnumEntry CallingConventions[] = { CV_ENUM_CLASS_ENT(CallingConvention, NearC), CV_ENUM_CLASS_ENT(CallingConvention, FarC), CV_ENUM_CLASS_ENT(CallingConvention, NearPascal), CV_ENUM_CLASS_ENT(CallingConvention, FarPascal), CV_ENUM_CLASS_ENT(CallingConvention, NearFast), CV_ENUM_CLASS_ENT(CallingConvention, FarFast), CV_ENUM_CLASS_ENT(CallingConvention, NearStdCall), CV_ENUM_CLASS_ENT(CallingConvention, FarStdCall), CV_ENUM_CLASS_ENT(CallingConvention, NearSysCall), CV_ENUM_CLASS_ENT(CallingConvention, FarSysCall), CV_ENUM_CLASS_ENT(CallingConvention, ThisCall), CV_ENUM_CLASS_ENT(CallingConvention, MipsCall), CV_ENUM_CLASS_ENT(CallingConvention, Generic), CV_ENUM_CLASS_ENT(CallingConvention, AlphaCall), CV_ENUM_CLASS_ENT(CallingConvention, PpcCall), CV_ENUM_CLASS_ENT(CallingConvention, SHCall), CV_ENUM_CLASS_ENT(CallingConvention, ArmCall), CV_ENUM_CLASS_ENT(CallingConvention, AM33Call), CV_ENUM_CLASS_ENT(CallingConvention, TriCall), CV_ENUM_CLASS_ENT(CallingConvention, SH5Call), CV_ENUM_CLASS_ENT(CallingConvention, M32RCall), CV_ENUM_CLASS_ENT(CallingConvention, ClrCall), CV_ENUM_CLASS_ENT(CallingConvention, Inline), CV_ENUM_CLASS_ENT(CallingConvention, NearVector), CV_ENUM_CLASS_ENT(CallingConvention, Swift), }; static const EnumEntry FunctionOptionEnum[] = { CV_ENUM_CLASS_ENT(FunctionOptions, CxxReturnUdt), CV_ENUM_CLASS_ENT(FunctionOptions, Constructor), CV_ENUM_CLASS_ENT(FunctionOptions, ConstructorWithVirtualBases), }; static const EnumEntry LabelTypeEnum[] = { CV_ENUM_CLASS_ENT(LabelType, Near), CV_ENUM_CLASS_ENT(LabelType, Far), }; static const EnumEntry JumpTableEntrySizeNames[] = { CV_ENUM_CLASS_ENT(JumpTableEntrySize, Int8), CV_ENUM_CLASS_ENT(JumpTableEntrySize, UInt8), CV_ENUM_CLASS_ENT(JumpTableEntrySize, Int16), CV_ENUM_CLASS_ENT(JumpTableEntrySize, UInt16), CV_ENUM_CLASS_ENT(JumpTableEntrySize, Int32), CV_ENUM_CLASS_ENT(JumpTableEntrySize, UInt32), CV_ENUM_CLASS_ENT(JumpTableEntrySize, Pointer), CV_ENUM_CLASS_ENT(JumpTableEntrySize, UInt8ShiftLeft), CV_ENUM_CLASS_ENT(JumpTableEntrySize, UInt16ShiftLeft), CV_ENUM_CLASS_ENT(JumpTableEntrySize, Int8ShiftLeft), CV_ENUM_CLASS_ENT(JumpTableEntrySize, Int16ShiftLeft), }; namespace llvm { namespace codeview { ArrayRef> getSymbolTypeNames() { return ArrayRef(SymbolTypeNames); } ArrayRef> getTypeLeafNames() { return ArrayRef(TypeLeafNames); } ArrayRef> getRegisterNames(CPUType Cpu) { if (Cpu == CPUType::ARMNT) { return ArrayRef(RegisterNames_ARM); } else if (Cpu == CPUType::ARM64) { return ArrayRef(RegisterNames_ARM64); } return ArrayRef(RegisterNames_X86); } ArrayRef> getPublicSymFlagNames() { return ArrayRef(PublicSymFlagNames); } ArrayRef> getProcSymFlagNames() { return ArrayRef(ProcSymFlagNames); } ArrayRef> getLocalFlagNames() { return ArrayRef(LocalFlags); } ArrayRef> getFrameCookieKindNames() { return ArrayRef(FrameCookieKinds); } ArrayRef> getSourceLanguageNames() { return ArrayRef(SourceLanguages); } ArrayRef> getCompileSym2FlagNames() { return ArrayRef(CompileSym2FlagNames); } ArrayRef> getCompileSym3FlagNames() { return ArrayRef(CompileSym3FlagNames); } ArrayRef> getFileChecksumNames() { return ArrayRef(FileChecksumNames); } ArrayRef> getCPUTypeNames() { return ArrayRef(CPUTypeNames); } ArrayRef> getFrameProcSymFlagNames() { return ArrayRef(FrameProcSymFlagNames); } ArrayRef> getExportSymFlagNames() { return ArrayRef(ExportSymFlagNames); } ArrayRef> getModuleSubstreamKindNames() { return ArrayRef(ModuleSubstreamKindNames); } ArrayRef> getThunkOrdinalNames() { return ArrayRef(ThunkOrdinalNames); } ArrayRef> getTrampolineNames() { return ArrayRef(TrampolineNames); } ArrayRef> getImageSectionCharacteristicNames() { return ArrayRef(ImageSectionCharacteristicNames); } ArrayRef> getClassOptionNames() { return ArrayRef(ClassOptionNames); } ArrayRef> getMemberAccessNames() { return ArrayRef(MemberAccessNames); } ArrayRef> getMethodOptionNames() { return ArrayRef(MethodOptionNames); } ArrayRef> getMemberKindNames() { return ArrayRef(MemberKindNames); } ArrayRef> getPtrKindNames() { return ArrayRef(PtrKindNames); } ArrayRef> getPtrModeNames() { return ArrayRef(PtrModeNames); } ArrayRef> getPtrMemberRepNames() { return ArrayRef(PtrMemberRepNames); } ArrayRef> getTypeModifierNames() { return ArrayRef(TypeModifierNames); } ArrayRef> getCallingConventions() { return ArrayRef(CallingConventions); } ArrayRef> getFunctionOptionEnum() { return ArrayRef(FunctionOptionEnum); } ArrayRef> getLabelTypeEnum() { return ArrayRef(LabelTypeEnum); } ArrayRef> getJumpTableEntrySizeNames() { return ArrayRef(JumpTableEntrySizeNames); } } // end namespace codeview } // end namespace llvm