BitcodeReader: Check for unresolved function metadata
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sat, 2 Apr 2016 14:55:01 +0000 (14:55 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sat, 2 Apr 2016 14:55:01 +0000 (14:55 +0000)
commit8742de9b20eb8b1960403842b38dcf0c80aa586b
tree950b446d4fc4bb27571de9246d02a63476c9dd06
parenta2c8da9e0613fd1a05b7c1342de9b4f6e41473ed
BitcodeReader: Check for unresolved function metadata

A follow-up commit will start using function metadata blocks more
heavily.  This commit adds some error checking to confirm that metadata
is fully resolved before (and after) materializing each function.

This is valid even when reading very old bitcode from before the
metadata/value split.  The global metadata block always came before the
function blocks.  However, in case somehow this causes a regression
(i.e., an old LLVM did produce such bitcode after all) I'm committing
separately.

llvm-svn: 265223
llvm/lib/Bitcode/Reader/BitcodeReader.cpp