Discard metadata produced by LLVM 2.7. The value enumeration it used
authorDan Gohman <gohman@apple.com>
Thu, 9 Sep 2010 23:12:39 +0000 (23:12 +0000)
committerDan Gohman <gohman@apple.com>
Thu, 9 Sep 2010 23:12:39 +0000 (23:12 +0000)
commit70c2fc0823bcc3970fdebf18ba69449d7822af86
tree1b3552a2f8e972d81ab5a83cb194eed3e822aea0
parent1ab6f2fa7a38a12d8f20157d71e5280a253f2578
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
include/llvm/Bitcode/LLVMBitCodes.h
lib/Bitcode/Reader/BitcodeReader.cpp
lib/Bitcode/Writer/BitcodeWriter.cpp
tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp