clang-format the large enum definitions in LLVMBitCodes.h

Suggestion from Duncan in a review thread.

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 265075
This commit is contained in:
Mehdi Amini 2016-03-31 23:27:37 +00:00
parent e503a71df1
commit 073442e183
1 changed files with 401 additions and 401 deletions

View File

@ -22,7 +22,7 @@
namespace llvm {
namespace bitc {
// The only top-level block type defined is for a module.
// The only top-level block type defined is for a module.
enum BlockIDs {
// Blocks
MODULE_BLOCK_ID = FIRST_APPLICATION_BLOCKID,
@ -70,8 +70,8 @@ enum IdentificationCodes {
/// also accepts N-1.
enum { BITCODE_CURRENT_EPOCH = 0 };
/// MODULE blocks have a number of optional fields and subblocks.
enum ModuleCodes {
/// MODULE blocks have a number of optional fields and subblocks.
enum ModuleCodes {
MODULE_CODE_VERSION = 1, // VERSION: [version#]
MODULE_CODE_TRIPLE = 2, // TRIPLE: [strchr x N]
MODULE_CODE_DATALAYOUT = 3, // DATALAYOUT: [strchr x N]
@ -107,20 +107,20 @@ enum { BITCODE_CURRENT_EPOCH = 0 };
// SOURCE_FILENAME: [namechar x N]
MODULE_CODE_SOURCE_FILENAME = 16,
};
};
/// PARAMATTR blocks have code for defining a parameter attribute set.
enum AttributeCodes {
/// PARAMATTR blocks have code for defining a parameter attribute set.
enum AttributeCodes {
// FIXME: Remove `PARAMATTR_CODE_ENTRY_OLD' in 4.0
PARAMATTR_CODE_ENTRY_OLD = 1, // ENTRY: [paramidx0, attr0,
// paramidx1, attr1...]
PARAMATTR_CODE_ENTRY = 2, // ENTRY: [paramidx0, attrgrp0,
// paramidx1, attrgrp1, ...]
PARAMATTR_GRP_CODE_ENTRY = 3 // ENTRY: [id, attr0, att1, ...]
};
};
/// TYPE blocks have codes for each type primitive they use.
enum TypeCodes {
/// TYPE blocks have codes for each type primitive they use.
enum TypeCodes {
TYPE_CODE_NUMENTRY = 1, // NUMENTRY: [numentries]
// Type Codes
@ -145,7 +145,7 @@ enum { BITCODE_CURRENT_EPOCH = 0 };
// binary compatibility.
TYPE_CODE_X86_FP80 = 13, // X86 LONG DOUBLE
TYPE_CODE_FP128 = 14, // LONG DOUBLE (112 bit mantissa)
TYPE_CODE_PPC_FP128= 15, // PPC LONG DOUBLE (2 doubles)
TYPE_CODE_PPC_FP128 = 15, // PPC LONG DOUBLE (2 doubles)
TYPE_CODE_METADATA = 16, // METADATA
@ -153,24 +153,24 @@ enum { BITCODE_CURRENT_EPOCH = 0 };
TYPE_CODE_STRUCT_ANON = 18, // STRUCT_ANON: [ispacked, eltty x N]
TYPE_CODE_STRUCT_NAME = 19, // STRUCT_NAME: [strchr x N]
TYPE_CODE_STRUCT_NAMED = 20,// STRUCT_NAMED: [ispacked, eltty x N]
TYPE_CODE_STRUCT_NAMED = 20, // STRUCT_NAMED: [ispacked, eltty x N]
TYPE_CODE_FUNCTION = 21, // FUNCTION: [vararg, retty, paramty x N]
TYPE_CODE_TOKEN = 22 // TOKEN
};
};
enum OperandBundleTagCode {
enum OperandBundleTagCode {
OPERAND_BUNDLE_TAG = 1, // TAG: [strchr x N]
};
};
// The type symbol table only has one code (TST_ENTRY_CODE).
enum TypeSymtabCodes {
// The type symbol table only has one code (TST_ENTRY_CODE).
enum TypeSymtabCodes {
TST_CODE_ENTRY = 1 // TST_ENTRY: [typeid, namechar x N]
};
};
// Value symbol table codes.
enum ValueSymtabCodes {
// Value symbol table codes.
enum ValueSymtabCodes {
VST_CODE_ENTRY = 1, // VST_ENTRY: [valueid, namechar x N]
VST_CODE_BBENTRY = 2, // VST_BBENTRY: [bbid, namechar x N]
VST_CODE_FNENTRY = 3, // VST_FNENTRY: [valueid, offset, namechar x N]
@ -178,16 +178,16 @@ enum { BITCODE_CURRENT_EPOCH = 0 };
VST_CODE_COMBINED_GVDEFENTRY = 4,
// VST_COMBINED_ENTRY: [valueid, refguid]
VST_CODE_COMBINED_ENTRY = 5
};
};
// The module path symbol table only has one code (MST_CODE_ENTRY).
enum ModulePathSymtabCodes {
// The module path symbol table only has one code (MST_CODE_ENTRY).
enum ModulePathSymtabCodes {
MST_CODE_ENTRY = 1, // MST_ENTRY: [modid, namechar x N]
};
};
// The summary section uses different codes in the per-module
// and combined index cases.
enum GlobalValueSummarySymtabCodes {
// The summary section uses different codes in the per-module
// and combined index cases.
enum GlobalValueSummarySymtabCodes {
// PERMODULE: [valueid, linkage, instcount, numrefs, numrefs x valueid,
// n x (valueid, callsitecount)]
FS_PERMODULE = 1,
@ -206,9 +206,9 @@ enum { BITCODE_CURRENT_EPOCH = 0 };
FS_COMBINED_PROFILE = 5,
// COMBINED_GLOBALVAR_INIT_REFS: [modid, linkage, n x valueid]
FS_COMBINED_GLOBALVAR_INIT_REFS = 6,
};
};
enum MetadataCodes {
enum MetadataCodes {
METADATA_STRING_OLD = 1, // MDSTRING: [values]
METADATA_VALUE = 2, // VALUE: [type num, value num]
METADATA_NODE = 3, // NODE: [n x md num]
@ -226,29 +226,29 @@ enum { BITCODE_CURRENT_EPOCH = 0 };
METADATA_BASIC_TYPE = 15, // [distinct, tag, name, size, align, enc]
METADATA_FILE = 16, // [distinct, filename, directory]
METADATA_DERIVED_TYPE = 17, // [distinct, ...]
METADATA_COMPOSITE_TYPE= 18, // [distinct, ...]
METADATA_SUBROUTINE_TYPE=19, // [distinct, flags, types]
METADATA_COMPOSITE_TYPE = 18, // [distinct, ...]
METADATA_SUBROUTINE_TYPE = 19, // [distinct, flags, types]
METADATA_COMPILE_UNIT = 20, // [distinct, ...]
METADATA_SUBPROGRAM = 21, // [distinct, ...]
METADATA_LEXICAL_BLOCK = 22, // [distinct, scope, file, line, column]
METADATA_LEXICAL_BLOCK_FILE=23,//[distinct, scope, file, discriminator]
METADATA_LEXICAL_BLOCK_FILE = 23, //[distinct, scope, file, discriminator]
METADATA_NAMESPACE = 24, // [distinct, scope, file, name, line]
METADATA_TEMPLATE_TYPE = 25, // [distinct, scope, name, type, ...]
METADATA_TEMPLATE_VALUE= 26, // [distinct, scope, name, type, value, ...]
METADATA_TEMPLATE_VALUE = 26, // [distinct, scope, name, type, value, ...]
METADATA_GLOBAL_VAR = 27, // [distinct, ...]
METADATA_LOCAL_VAR = 28, // [distinct, ...]
METADATA_EXPRESSION = 29, // [distinct, n x element]
METADATA_OBJC_PROPERTY = 30, // [distinct, name, file, line, ...]
METADATA_IMPORTED_ENTITY=31, // [distinct, tag, scope, entity, line, name]
METADATA_IMPORTED_ENTITY = 31, // [distinct, tag, scope, entity, line, name]
METADATA_MODULE = 32, // [distinct, scope, name, ...]
METADATA_MACRO = 33, // [distinct, macinfo, line, name, value]
METADATA_MACRO_FILE = 34, // [distinct, macinfo, line, file, ...]
METADATA_STRINGS = 35, // [count, offset] blob([lengths][chars])
};
};
// The constants block (CONSTANTS_BLOCK_ID) describes emission for each
// constant and maintains an implicit current type value.
enum ConstantsCodes {
// The constants block (CONSTANTS_BLOCK_ID) describes emission for each
// constant and maintains an implicit current type value.
enum ConstantsCodes {
CST_CODE_SETTYPE = 1, // SETTYPE: [typeid]
CST_CODE_NULL = 2, // NULL
CST_CODE_UNDEF = 3, // UNDEF
@ -269,18 +269,18 @@ enum { BITCODE_CURRENT_EPOCH = 0 };
CST_CODE_INLINEASM_OLD = 18, // INLINEASM: [sideeffect|alignstack,
// asmstr,conststr]
CST_CODE_CE_SHUFVEC_EX = 19, // SHUFVEC_EX: [opty, opval, opval, opval]
CST_CODE_CE_INBOUNDS_GEP = 20,// INBOUNDS_GEP: [n x operands]
CST_CODE_CE_INBOUNDS_GEP = 20, // INBOUNDS_GEP: [n x operands]
CST_CODE_BLOCKADDRESS = 21, // CST_CODE_BLOCKADDRESS [fnty, fnval, bb#]
CST_CODE_DATA = 22, // DATA: [n x elements]
CST_CODE_INLINEASM = 23 // INLINEASM: [sideeffect|alignstack|
// asmdialect,asmstr,conststr]
};
};
/// CastOpcodes - These are values used in the bitcode files to encode which
/// cast a CST_CODE_CE_CAST or a XXX refers to. The values of these enums
/// have no fixed relation to the LLVM IR enum values. Changing these will
/// break compatibility with old files.
enum CastOpcodes {
/// CastOpcodes - These are values used in the bitcode files to encode which
/// cast a CST_CODE_CE_CAST or a XXX refers to. The values of these enums
/// have no fixed relation to the LLVM IR enum values. Changing these will
/// break compatibility with old files.
enum CastOpcodes {
CAST_TRUNC = 0,
CAST_ZEXT = 1,
CAST_SEXT = 2,
@ -294,13 +294,13 @@ enum { BITCODE_CURRENT_EPOCH = 0 };
CAST_INTTOPTR = 10,
CAST_BITCAST = 11,
CAST_ADDRSPACECAST = 12
};
};
/// BinaryOpcodes - These are values used in the bitcode files to encode which
/// binop a CST_CODE_CE_BINOP or a XXX refers to. The values of these enums
/// have no fixed relation to the LLVM IR enum values. Changing these will
/// break compatibility with old files.
enum BinaryOpcodes {
/// BinaryOpcodes - These are values used in the bitcode files to encode which
/// binop a CST_CODE_CE_BINOP or a XXX refers to. The values of these enums
/// have no fixed relation to the LLVM IR enum values. Changing these will
/// break compatibility with old files.
enum BinaryOpcodes {
BINOP_ADD = 0,
BINOP_SUB = 1,
BINOP_MUL = 2,
@ -314,12 +314,12 @@ enum { BITCODE_CURRENT_EPOCH = 0 };
BINOP_AND = 10,
BINOP_OR = 11,
BINOP_XOR = 12
};
};
/// These are values used in the bitcode files to encode AtomicRMW operations.
/// The values of these enums have no fixed relation to the LLVM IR enum
/// values. Changing these will break compatibility with old files.
enum RMWOperations {
/// These are values used in the bitcode files to encode AtomicRMW operations.
/// The values of these enums have no fixed relation to the LLVM IR enum
/// values. Changing these will break compatibility with old files.
enum RMWOperations {
RMW_XCHG = 0,
RMW_ADD = 1,
RMW_SUB = 2,
@ -331,23 +331,21 @@ enum { BITCODE_CURRENT_EPOCH = 0 };
RMW_MIN = 8,
RMW_UMAX = 9,
RMW_UMIN = 10
};
};
/// OverflowingBinaryOperatorOptionalFlags - Flags for serializing
/// OverflowingBinaryOperator's SubclassOptionalData contents.
enum OverflowingBinaryOperatorOptionalFlags {
/// OverflowingBinaryOperatorOptionalFlags - Flags for serializing
/// OverflowingBinaryOperator's SubclassOptionalData contents.
enum OverflowingBinaryOperatorOptionalFlags {
OBO_NO_UNSIGNED_WRAP = 0,
OBO_NO_SIGNED_WRAP = 1
};
};
/// PossiblyExactOperatorOptionalFlags - Flags for serializing
/// PossiblyExactOperator's SubclassOptionalData contents.
enum PossiblyExactOperatorOptionalFlags {
PEO_EXACT = 0
};
/// PossiblyExactOperatorOptionalFlags - Flags for serializing
/// PossiblyExactOperator's SubclassOptionalData contents.
enum PossiblyExactOperatorOptionalFlags { PEO_EXACT = 0 };
/// Encoded AtomicOrdering values.
enum AtomicOrderingCodes {
/// Encoded AtomicOrdering values.
enum AtomicOrderingCodes {
ORDERING_NOTATOMIC = 0,
ORDERING_UNORDERED = 1,
ORDERING_MONOTONIC = 2,
@ -355,27 +353,27 @@ enum { BITCODE_CURRENT_EPOCH = 0 };
ORDERING_RELEASE = 4,
ORDERING_ACQREL = 5,
ORDERING_SEQCST = 6
};
};
/// Encoded SynchronizationScope values.
enum AtomicSynchScopeCodes {
/// Encoded SynchronizationScope values.
enum AtomicSynchScopeCodes {
SYNCHSCOPE_SINGLETHREAD = 0,
SYNCHSCOPE_CROSSTHREAD = 1
};
};
/// Markers and flags for call instruction.
enum CallMarkersFlags {
/// Markers and flags for call instruction.
enum CallMarkersFlags {
CALL_TAIL = 0,
CALL_CCONV = 1,
CALL_MUSTTAIL = 14,
CALL_EXPLICIT_TYPE = 15,
CALL_NOTAIL = 16,
CALL_FMF = 17 // Call has optional fast-math-flags.
};
};
// The function body block (FUNCTION_BLOCK_ID) describes function bodies. It
// can contain a constant block (CONSTANTS_BLOCK_ID).
enum FunctionCodes {
// The function body block (FUNCTION_BLOCK_ID) describes function bodies. It
// can contain a constant block (CONSTANTS_BLOCK_ID).
enum FunctionCodes {
FUNC_CODE_DECLAREBLOCKS = 1, // DECLAREBLOCKS: [n]
FUNC_CODE_INST_BINOP = 2, // BINOP: [opcode, ty, opval, opval]
@ -429,7 +427,8 @@ enum { BITCODE_CURRENT_EPOCH = 0 };
// align, vol,
// ordering, synchscope]
FUNC_CODE_INST_RESUME = 39, // RESUME: [opval]
FUNC_CODE_INST_LANDINGPAD_OLD = 40, // LANDINGPAD: [ty,val,val,num,id0,val0...]
FUNC_CODE_INST_LANDINGPAD_OLD =
40, // LANDINGPAD: [ty,val,val,num,id0,val0...]
FUNC_CODE_INST_LOADATOMIC = 41, // LOAD: [opty, op, align, vol,
// ordering, synchscope]
FUNC_CODE_INST_STOREATOMIC_OLD = 42, // STORE: [ptrty,ptr,val, align, vol
@ -444,18 +443,19 @@ enum { BITCODE_CURRENT_EPOCH = 0 };
FUNC_CODE_INST_CATCHRET = 49, // CATCHRET: [val,bb#]
FUNC_CODE_INST_CATCHPAD = 50, // CATCHPAD: [bb#,bb#,num,args...]
FUNC_CODE_INST_CLEANUPPAD = 51, // CLEANUPPAD: [num,args...]
FUNC_CODE_INST_CATCHSWITCH = 52, // CATCHSWITCH: [num,args...] or [num,args...,bb]
FUNC_CODE_INST_CATCHSWITCH =
52, // CATCHSWITCH: [num,args...] or [num,args...,bb]
// 53 is unused.
// 54 is unused.
FUNC_CODE_OPERAND_BUNDLE = 55, // OPERAND_BUNDLE: [tag#, value...]
};
};
enum UseListCodes {
enum UseListCodes {
USELIST_CODE_DEFAULT = 1, // DEFAULT: [index..., value-id]
USELIST_CODE_BB = 2 // BB: [index..., bb-id]
};
};
enum AttributeKindCodes {
enum AttributeKindCodes {
// = 0 is unused
ATTR_KIND_ALIGNMENT = 1,
ATTR_KIND_ALWAYS_INLINE = 2,
@ -507,15 +507,15 @@ enum { BITCODE_CURRENT_EPOCH = 0 };
ATTR_KIND_NO_RECURSE = 48,
ATTR_KIND_INACCESSIBLEMEM_ONLY = 49,
ATTR_KIND_INACCESSIBLEMEM_OR_ARGMEMONLY = 50
};
};
enum ComdatSelectionKindCodes {
enum ComdatSelectionKindCodes {
COMDAT_SELECTION_KIND_ANY = 1,
COMDAT_SELECTION_KIND_EXACT_MATCH = 2,
COMDAT_SELECTION_KIND_LARGEST = 3,
COMDAT_SELECTION_KIND_NO_DUPLICATES = 4,
COMDAT_SELECTION_KIND_SAME_SIZE = 5,
};
};
} // End bitc namespace
} // End llvm namespace