use num_enum::TryFromPrimitive;
#[derive(Debug, Copy, Clone, PartialEq, Hash, TryFromPrimitive)]
#[repr(u8)]
#[non_exhaustive]
pub enum BlockId {
Module = 8,
ParamAttr,
ParamAttrGroup,
Constants,
Function,
Identification,
ValueSymtab,
Metadata,
MetadataAttachment,
Type = 17,
Uselist,
ModuleStrtab,
#[deprecated]
GlobalvalSummary,
OperandBundleTags,
MetadataKind,
Strtab,
FullLtoGlobalvalSummary,
Symtab,
SyncScopeNames,
}
#[derive(Debug, Copy, Clone, PartialEq, TryFromPrimitive)]
#[repr(u8)]
#[non_exhaustive]
pub enum OperandBundleTagCode {
Tag = 1,
}
#[derive(Debug, Copy, Clone, PartialEq, TryFromPrimitive)]
#[repr(u8)]
#[non_exhaustive]
pub enum SyncScopeNameCode {
Name = 1,
}
#[derive(Debug, Copy, Clone, PartialEq, TryFromPrimitive)]
#[repr(u8)]
#[non_exhaustive]
pub enum StrtabCode {
Blob = 1,
}
#[derive(Debug, Copy, Clone, PartialEq, TryFromPrimitive)]
#[repr(u8)]
#[non_exhaustive]
pub enum SymtabCode {
Blob = 1,
}
#[derive(Debug, Copy, Clone, PartialEq, TryFromPrimitive)]
#[repr(u8)]
#[non_exhaustive]
pub enum ModuleCode {
Version = 1,
Triple = 2,
Datalayout = 3,
Asm = 4,
SectionName = 5,
#[deprecated]
Deplib = 6,
GlobalVar = 7,
Function = 8,
#[deprecated]
AliasOld = 9,
GCName = 11,
Comdat = 12,
VstOffset = 13,
Alias = 14,
#[deprecated]
MetadataValuesUnused = 15,
SourceFilename = 16,
Hash = 17,
Ifunc = 18,
}
#[derive(Debug, Copy, Clone, PartialEq, TryFromPrimitive)]
#[repr(u8)]
#[non_exhaustive]
pub enum GlobalValueSummaryCode {
PerModule = 1,
PerModuleProfile = 2,
PerModuleGlobalvarInitRefs = 3,
Combined = 4,
CombinedProfile = 5,
CombinedGlobalvarInitRefs = 6,
Alias = 7,
CombinedAlias = 8,
CombinedOriginalName = 9,
Version = 10,
TypeTests = 11,
TypeTestAssumeVCalls = 12,
TypeCheckedLoadVCalls = 13,
TypeTestAssumeConstVCall = 14,
TypeCheckedLoadConstVCall = 15,
ValueGuid = 16,
CfiFunctionDefs = 17,
CfiFunctionDecls = 18,
PerModuleRelBf = 19,
Flags = 20,
TypeId = 21,
TypeIdMetadata = 22,
PerModuleVtableGlobalvarInitRefs = 23,
BlockCount = 24,
ParamAccess = 25,
PerModuleCallsiteInfo = 26,
PerModuleAllocInfo = 27,
CombinedCallsiteInfo = 28,
CombinedAllocInfo = 29,
StackIds = 30,
AllocContextIds = 31,
ContextRadixTreeArray = 32,
}
#[derive(Debug, Copy, Clone, PartialEq, TryFromPrimitive)]
#[repr(u8)]
#[non_exhaustive]
pub enum MetadataCode {
#[deprecated]
StringOld = 1,
Value = 2,
Node = 3,
Name = 4,
DistinctNode = 5,
Kind = 6,
Location = 7,
OldNode = 8,
OldFnNode = 9,
NamedNode = 10,
Attachment = 11,
GenericDebug = 12,
Subrange = 13,
Enumerator = 14,
BasicType = 15,
File = 16,
DerivedType = 17,
CompositeType = 18,
SubroutineType = 19,
CompileUnit = 20,
Subprogram = 21,
LexicalBlock = 22,
LexicalBlockFile = 23,
Namespace = 24,
TemplateType = 25,
TemplateValue = 26,
GlobalVar = 27,
LocalVar = 28,
Expression = 29,
ObjcProperty = 30,
ImportedEntity = 31,
Module = 32,
Macro = 33,
MacroFile = 34,
Strings = 35,
GlobalDeclAttachment = 36,
GlobalVarExpr = 37,
IndexOffset = 38,
Index = 39,
Label = 40,
StringType = 41,
CommonBlock = 44,
GenericSubrange = 45,
ArgList = 46,
AssignId = 47,
}
#[derive(Debug, Copy, Clone, PartialEq, TryFromPrimitive)]
#[repr(u8)]
#[non_exhaustive]
pub enum UselistCode {
Default = 1,
BB = 2,
}
#[derive(Debug, Copy, Clone, PartialEq, TryFromPrimitive)]
#[repr(u8)]
#[non_exhaustive]
pub enum IdentificationCode {
String = 1,
Epoch = 2,
}
#[derive(Debug, Copy, Clone, PartialEq, TryFromPrimitive)]
#[repr(u8)]
#[non_exhaustive]
pub enum AttributeCode {
#[deprecated]
EntryOld = 1,
Entry = 2,
GroupEntry = 3,
}
#[derive(Debug, Copy, Clone, PartialEq, TryFromPrimitive)]
#[repr(u8)]
#[non_exhaustive]
pub enum ValueSymtabCode {
Entry = 1,
BbEntry = 2,
FnEntry = 3,
CombinedEntry = 5,
}
#[derive(Debug, Copy, Clone, PartialEq, TryFromPrimitive)]
#[repr(u8)]
#[non_exhaustive]
pub enum TypeCode {
NumEntry = 1,
Void = 2,
Float = 3,
Double = 4,
Label = 5,
Opaque = 6,
Integer = 7,
#[deprecated]
Pointer = 8,
#[deprecated]
FunctionOld = 9,
Half = 10,
Array = 11,
Vector = 12,
X86Fp80 = 13,
Fp128 = 14,
PpcFp128 = 15,
Metadata = 16,
X86Mmx = 17,
StructAnon = 18,
StructName = 19,
StructNamed = 20,
Function = 21,
Token = 22,
BFloat = 23,
X86Amx = 24,
OpaquePointer = 25,
TargetType = 26,
}
#[derive(Debug, Copy, Clone, PartialEq, TryFromPrimitive)]
#[repr(u8)]
#[non_exhaustive]
pub enum ConstantsCodes {
Settype = 1,
Null = 2,
Undef = 3,
Integer = 4,
WideInteger = 5,
Float = 6,
Aggregate = 7,
String = 8,
CString = 9,
BinOp = 10,
Cast = 11,
#[deprecated]
GepOld = 12,
Select = 13,
ExtractElt = 14,
InsertElt = 15,
ShuffleVec = 16,
#[deprecated]
Cmp = 17,
#[deprecated]
InlineasmOld = 18,
ShufVecEx = 19,
#[deprecated]
InboundsGep = 20,
BlockAddress = 21,
Data = 22,
#[deprecated]
InlineAsmOld2 = 23,
#[deprecated]
GepWithInrangeIndexOld = 24,
UnOp = 25,
Poison = 26,
DsoLocalEquivalent = 27,
#[deprecated]
InlineAsmOld3 = 28,
NoCfiValue = 29,
InlineAsm = 30,
GepWithInrange = 31,
Gep = 32,
PtrAuth = 33,
}
#[derive(Debug, Copy, Clone, PartialEq, TryFromPrimitive)]
#[repr(u8)]
#[non_exhaustive]
pub enum FunctionCode {
DeclareBlocks = 1,
BinOp = 2,
Cast = 3,
#[deprecated]
GepOld = 4,
#[deprecated]
SelectOld = 5,
ExtractElt = 6,
InsertElt = 7,
ShuffleVec = 8,
#[deprecated]
Cmp = 9,
Ret = 10,
Br = 11,
Switch = 12,
Invoke = 13,
Unreachable = 15,
Phi = 16,
Alloca = 19,
Load = 20,
VaArg = 23,
#[deprecated]
StoreOld = 24,
ExtractVal = 26,
InsertVal = 27,
Cmp2 = 28,
Vselect = 29,
#[deprecated]
InboundsGepOld = 30,
IndirectBr = 31,
DebugLocAgain = 33,
Call = 34,
DebugLoc = 35,
Fence = 36,
#[deprecated]
CmpXchgOld = 37,
#[deprecated]
AtomicRmwOld = 38,
Resume = 39,
#[deprecated]
LandingPadOld = 40,
LoadAtomic = 41,
#[deprecated]
StoreAtomicOld = 42,
Gep = 43,
Store = 44,
StoreAtomic = 45,
AtomicCmpXchg = 46,
LandingPad = 47,
CleanupRet = 48,
CatchRet = 49,
CatchPad = 50,
CleanupPad = 51,
CatchSwitch = 52,
OperandBundle = 55,
UnOp = 56,
CallBr = 57,
Freeze = 58,
AtomicRmw = 59,
BlockaddrUsers = 60,
DebugRecordValue = 61,
DebugRecordDeclare = 62,
DebugRecordAssign = 63,
DebugRecordValueSimple = 64,
DebugRecordLabel = 65,
}
#[derive(Debug, Copy, Clone, PartialEq, TryFromPrimitive)]
#[repr(u8)]
#[non_exhaustive]
pub enum ModulePathSymtabCode {
Entry = 1,
Hash = 2,
}