BitcodeWriter: Replace dead code with an assertion, NFC

The caller of ValueEnumerator::EnumerateOperandType never sends in
metadata.  Assert that, and remove the unnecessary logic.

llvm-svn: 264558
This commit is contained in:
Duncan P. N. Exon Smith 2016-03-28 00:03:12 +00:00
parent b42fa2e5c6
commit 544e4f97b3
1 changed files with 1 additions and 7 deletions

View File

@ -660,13 +660,7 @@ void ValueEnumerator::EnumerateType(Type *Ty) {
void ValueEnumerator::EnumerateOperandType(const Value *V) {
EnumerateType(V->getType());
if (auto *MD = dyn_cast<MetadataAsValue>(V)) {
assert(!isa<LocalAsMetadata>(MD->getMetadata()) &&
"Function-local metadata should be left for later");
EnumerateMetadata(MD->getMetadata());
return;
}
assert(!isa<MetadataAsValue>(V) && "Unexpected metadata operand");
const Constant *C = dyn_cast<Constant>(V);
if (!C)