Discard metadata produced by LLVM 2.7. The value enumeration it used
is different from what the code now uses in a two ways: NamedMDNodes
were considered Values and included in the numbering, and the
function-local metadata counter wasn't reset between functions.
The later problem breaks lazy deserialization, so instead of trying
to emulate the old numbering, just drop the old metadata. The only
in-tree use case is debug info with LTO, where the QOI loss is
considered acceptable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113557 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp b/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp
index 80a8d74..9c0d675 100644
--- a/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp
+++ b/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp
@@ -236,6 +236,8 @@
case bitc::FUNC_CODE_INST_VSELECT: return "INST_VSELECT";
case bitc::FUNC_CODE_DEBUG_LOC: return "DEBUG_LOC";
case bitc::FUNC_CODE_DEBUG_LOC_AGAIN: return "DEBUG_LOC_AGAIN";
+ case bitc::FUNC_CODE_INST_CALL2: return "INST_CALL2";
+ case bitc::FUNC_CODE_DEBUG_LOC2: return "DEBUG_LOC2";
}
case bitc::TYPE_SYMTAB_BLOCK_ID:
switch (CodeID) {
@@ -263,6 +265,10 @@
case bitc::METADATA_NAMED_NODE: return "METADATA_NAMED_NODE";
case bitc::METADATA_KIND: return "METADATA_KIND";
case bitc::METADATA_ATTACHMENT: return "METADATA_ATTACHMENT";
+ case bitc::METADATA_NODE2: return "METADATA_NODE2";
+ case bitc::METADATA_FN_NODE2: return "METADATA_FN_NODE2";
+ case bitc::METADATA_NAMED_NODE2: return "METADATA_NAMED_NODE2";
+ case bitc::METADATA_ATTACHMENT2: return "METADATA_ATTACHMENT2";
}
}
}