Add code for emitting the attribute groups.

This is some initial code for emitting the attribute groups into the bitcode.

NOTE: This format *may* change! Do not rely upon the attribute groups' bitcode
not changing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174845 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bill Wendling
2013-02-10 23:09:32 +00:00
parent 8c2e77f895
commit 0f715c26bd
2 changed files with 61 additions and 8 deletions

View File

@ -29,13 +29,12 @@ namespace bitc {
// Module sub-block id's.
PARAMATTR_BLOCK_ID,
UNUSED_ID1,
PARAMATTR_GROUP_BLOCK_ID,
CONSTANTS_BLOCK_ID,
FUNCTION_BLOCK_ID,
UNUSED_ID2,
UNUSED_ID1,
VALUE_SYMTAB_BLOCK_ID,
METADATA_BLOCK_ID,
@ -69,7 +68,7 @@ namespace bitc {
// ALIAS: [alias type, aliasee val#, linkage, visibility]
MODULE_CODE_ALIAS = 9,
/// MODULE_CODE_PURGEVALS: [numvals]
// MODULE_CODE_PURGEVALS: [numvals]
MODULE_CODE_PURGEVALS = 10,
MODULE_CODE_GCNAME = 11 // GCNAME: [strchr x N]
@ -78,10 +77,11 @@ namespace bitc {
/// 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_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.