Write and read metadata attachments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82259 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel
2009-09-18 19:26:43 +00:00
parent 88d9839d07
commit e8e0213cc3
10 changed files with 256 additions and 19 deletions

View File

@ -34,7 +34,8 @@ namespace bitc {
FUNCTION_BLOCK_ID,
TYPE_SYMTAB_BLOCK_ID,
VALUE_SYMTAB_BLOCK_ID,
METADATA_BLOCK_ID
METADATA_BLOCK_ID,
METADATA_ATTACHMENT_ID
};
@ -111,7 +112,9 @@ namespace bitc {
METADATA_STRING = 1, // MDSTRING: [values]
METADATA_NODE = 2, // MDNODE: [n x (type num, value num)]
METADATA_NAME = 3, // STRING: [values]
METADATA_NAMED_NODE = 4 // NAMEDMDNODE: [n x mdnodes]
METADATA_NAMED_NODE = 4, // NAMEDMDNODE: [n x mdnodes]
METADATA_KIND = 5, // [n x [id, name]]
METADATA_ATTACHMENT = 6 // [m x [value, [n x [id, mdnode]]]
};
// The constants block (CONSTANTS_BLOCK_ID) describes emission for each
// constant and maintains an implicit current type value.