diff options
author | Nowar Gu <nowar100@gmail.com> | 2011-06-25 14:24:15 +0800 |
---|---|---|
committer | Nowar Gu <nowar100@gmail.com> | 2011-06-25 14:33:30 +0800 |
commit | c7724cf3957f39d927f430969af25eddc2875df4 (patch) | |
tree | 5cbcc9dbb92af67f738797720067412a3fd92494 /include/llvm | |
parent | 8012bd3687ad40b9bb18505c51ab5cf88eb00c45 (diff) | |
download | external_llvm-c7724cf3957f39d927f430969af25eddc2875df4.zip external_llvm-c7724cf3957f39d927f430969af25eddc2875df4.tar.gz external_llvm-c7724cf3957f39d927f430969af25eddc2875df4.tar.bz2 |
Recover LLVM 2.7 parse bitcode backward-compatible.
Since LLVM 3.0 modify the bitcode format, it will break old bitcode.
I fix the following commit by Chris Lattner.
020a5a449f297ced1f0fed08fb81c5da87fb7c9a
9d61dd9a088be975df4beb4632a39ed009bd0ef5
96a74c57d9e8fe0595ba8308eec1276cf8bcf6b0
4f6bab98c54a93276b8370d3f61f63bf765f7e1f
Now LLVM can support *READ* either old or new version bitcode.
That won't make trouble on Android legacy code.
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/Bitcode/LLVMBitCodes.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/llvm/Bitcode/LLVMBitCodes.h b/include/llvm/Bitcode/LLVMBitCodes.h index d3fee54..d202b78 100644 --- a/include/llvm/Bitcode/LLVMBitCodes.h +++ b/include/llvm/Bitcode/LLVMBitCodes.h @@ -112,11 +112,15 @@ namespace bitc { enum MetadataCodes { METADATA_STRING = 1, // MDSTRING: [values] + METADATA_NODE_27 = 2, + METADATA_FN_NODE_27 = 3, // 2 is unused. // 3 is unused. METADATA_NAME = 4, // STRING: [values] + METADATA_NAMED_NODE_27 = 5, // 5 is unused. METADATA_KIND = 6, // [n x [id, name]] + METADATA_ATTACHMENT_27 = 7, // 7 is unused. METADATA_NODE = 8, // NODE: [n x (type num, value num)] METADATA_FN_NODE = 9, // FN_NODE: [n x (type num, value num)] @@ -223,10 +227,14 @@ namespace bitc { FUNC_CODE_INST_UNREACHABLE = 15, // UNREACHABLE FUNC_CODE_INST_PHI = 16, // PHI: [ty, val0,bb0, ...] + FUNC_CODE_INST_MALLOC_27 = 17, + FUNC_CODE_INST_FREE_27 = 18, // 17 is unused. // 18 is unused. FUNC_CODE_INST_ALLOCA = 19, // ALLOCA: [instty, op, align] FUNC_CODE_INST_LOAD = 20, // LOAD: [opty, op, align, vol] + FUNC_CODE_INST_STORE_27 = 21, + FUNC_CODE_INST_CALL_27 = 22, // 21 is unused. // 22 is unused. FUNC_CODE_INST_VAARG = 23, // VAARG: [valistty, valist, instty] @@ -234,6 +242,7 @@ namespace bitc { // this is so information only available in the pointer type (e.g. address // spaces) is retained. FUNC_CODE_INST_STORE = 24, // STORE: [ptrty,ptr,val, align, vol] + FUNC_CODE_INST_GETRESULT_27 = 25, // 25 is unused. FUNC_CODE_INST_EXTRACTVAL = 26, // EXTRACTVAL: [n x operands] FUNC_CODE_INST_INSERTVAL = 27, // INSERTVAL: [n x operands] @@ -244,6 +253,7 @@ namespace bitc { FUNC_CODE_INST_VSELECT = 29, // VSELECT: [ty,opval,opval,predty,pred] FUNC_CODE_INST_INBOUNDS_GEP= 30, // INBOUNDS_GEP: [n x operands] FUNC_CODE_INST_INDIRECTBR = 31, // INDIRECTBR: [opty, op0, op1, ...] + FUNC_CODE_DEBUG_LOC_27 = 32, // 32 is unused. FUNC_CODE_DEBUG_LOC_AGAIN = 33, // DEBUG_LOC_AGAIN |